Simplify call-with-temporary-directory.
This commit is contained in:
parent
522f75ffac
commit
2a8fb2ce5b
1 changed files with 1 additions and 3 deletions
|
@ -52,9 +52,7 @@
|
|||
(define (call-with-temporary-directory proc)
|
||||
"Call PROC with a name of a temporary directory; close the directory and
|
||||
delete it when leaving the dynamic extent of this call."
|
||||
(let* ((directory (or (getenv "TMPDIR") "/tmp"))
|
||||
(template (string-append directory "/ordo.XXXXXX"))
|
||||
(tmp-dir (mkdtemp! template)))
|
||||
(let ((tmp-dir (create-temporary-directory)))
|
||||
(dynamic-wind
|
||||
(const #t)
|
||||
(lambda ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue