Skip to content

Commit

Permalink
fix: only remove tmpdir when tmpdir actually is created (#38)
Browse files Browse the repository at this point in the history
It could be that tmpdir is never created, particularly in the
--r1cs mode (so there is no circom compilation which requires tmpdir),
and under the situation where propagation suffices for determining
safety (so no need to call the solver => no need to create the smt2 file
in the tmpdir). In such case, tmpdir is false, so Picus fails with a
contract error. This commit fixes the problem.
  • Loading branch information
sorawee authored Sep 25, 2023
1 parent 2bf2874 commit c612a21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion picus/tmpdir.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
tmpdir)

(define (clean-tmpdir!)
(delete-directory/files tmpdir #:must-exist? #f))
(when tmpdir
(delete-directory/files tmpdir)))

0 comments on commit c612a21

Please sign in to comment.