Skip to content

Commit

Permalink
mktemp actually creates a new random filename before returning it
Browse files Browse the repository at this point in the history
  • Loading branch information
akkartik committed Apr 8, 2012
1 parent f311b38 commit df9fd21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arc.arc
Expand Up @@ -906,7 +906,7 @@

(mac tofile (f . body)
(w/uniq (gf gs)
`(let ,gs (+ ,f "." rand-string.6)
`(let ,gs (mktemp ,f)
(w/outfile ,gf ,gs
(w/stdout ,gf
,@body))
Expand Down Expand Up @@ -1718,6 +1718,9 @@
(def thread-rewind-receive args
(ac-niltree:$:thread-rewind-receive (ac-denil ,args)))

(def mktemp((o prefix "arc"))
($ (path->string (make-temporary-file (string-append prefix ".~a")))))

(mac trav (x . fs)
(w/uniq g
`((afn (,g)
Expand Down

0 comments on commit df9fd21

Please sign in to comment.