mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
utils: 'with-atomic-file-output' closes the port upon exception.
Previously it could have left the file descriptor open. * guix/utils.scm (with-atomic-file-output): Call 'close-port' in handler.
This commit is contained in:
parent
d1f33ba44b
commit
c25637dfe8
1 changed files with 2 additions and 1 deletions
|
@ -630,7 +630,8 @@ (define (with-atomic-file-output file proc)
|
|||
(rename-file template file)
|
||||
result))
|
||||
(lambda (key . args)
|
||||
(false-if-exception (delete-file template))))))
|
||||
(false-if-exception (delete-file template))
|
||||
(close-port out)))))
|
||||
|
||||
(define (cache-directory)
|
||||
"Return the cache directory for Guix, by default ~/.cache/guix."
|
||||
|
|
Loading…
Reference in a new issue