guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: http-client: 'http-fetch/cached' updates the cache atomically.


From: Ludovic Courtès
Subject: 01/03: http-client: 'http-fetch/cached' updates the cache atomically.
Date: Thu, 25 Feb 2016 18:32:52 +0000

civodul pushed a commit to branch master
in repository guix.

commit e72f50a7873b3233a8f962a7374e1219d0426230
Author: Ludovic Courtès <address@hidden>
Date:   Thu Feb 25 16:49:11 2016 +0100

    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'.
---
 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 31b511e..b26795c 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]