diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-02-25 16:49:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-02-25 16:49:11 +0100 |
commit | e72f50a7873b3233a8f962a7374e1219d0426230 (patch) | |
tree | c4ccc5808781250578e2c7fc74a723224a2e4041 /guix/http-client.scm | |
parent | 736f9ffce22f994e6141fa81c4dd9f2997ab1049 (diff) |
http-client: 'http-fetch/cached' updates the cache atomically.
* guix/http-client.scm (http-fetch/cached)[update-cache]: Use
'with-atomic-file-output' instead of 'call-with-output-file'.
Diffstat (limited to 'guix/http-client.scm')
-rw-r--r-- | guix/http-client.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/http-client.scm b/guix/http-client.scm index 31b511eb1c..b26795c64d 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -291,7 +291,7 @@ Raise an '&http-get-error' condition if downloading fails." ;; Update the cache and return an input port. (let ((port (http-fetch uri #:text? text?))) (mkdir-p directory) - (call-with-output-file file + (with-atomic-file-output file (cut dump-port port <>)) (close-port port) (open-input-file file))) |