Commit ec32d819 authored by Ludovic Courtès's avatar Ludovic Courtès

browse: Write 'packages.json' atomically.

* browse/web-interface.scm (request-packages-json-handler): Use
parent 3632a6e4
......@@ -68,13 +68,14 @@
("version" ,(package-version package))
("synopsis" ,(package-synopsis package))
("homepage" ,(package-home-page package)))))))
(with-output-to-file packages-file
(lambda _
(with-atomic-file-output packages-file
(lambda (port)
(scm->json (map package->json
(lambda (a b)
(string= (package-name a) b))
all-packages %package-blacklist)))))
all-packages %package-blacklist))
(when cache-timeout-exists?
(delete-file cache-timeout-file))))
(request-file-handler "packages.json")))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment