2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

Make the dumps page work when dumps is a symlink

This commit is contained in:
Christopher Baines 2020-03-01 16:51:10 +00:00
parent b19227c086
commit c59d90c26b

View file

@ -77,7 +77,14 @@ reaches the Guix Data Service"))
(sort (file-system-fold enter? leaf down up skip error
'() ; Start with an empty alist
(%config 'dumps-dir))
(%config 'dumps-dir)
(lambda args
;; Use stat, then fall back to lstat if that fails
(catch #t
(lambda ()
(apply stat args))
(lambda _
(apply lstat args)))))
(lambda (a b)
;; Sort so that the recent dumps are first
(string>? (car a) (car b)))))