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.master
parent
d1f33ba44b
commit
c25637dfe8
|
@ -630,7 +630,8 @@ output port, and PROC's result is returned."
|
||||||
(rename-file template file)
|
(rename-file template file)
|
||||||
result))
|
result))
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(false-if-exception (delete-file template))))))
|
(false-if-exception (delete-file template))
|
||||||
|
(close-port out)))))
|
||||||
|
|
||||||
(define (cache-directory)
|
(define (cache-directory)
|
||||||
"Return the cache directory for Guix, by default ~/.cache/guix."
|
"Return the cache directory for Guix, by default ~/.cache/guix."
|
||||||
|
|
Reference in New Issue