aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-03-01 16:51:10 +0000
committerChristopher Baines <mail@cbaines.net>2020-03-01 16:51:10 +0000
commitc59d90c26be0ccf13d82afd15a65e0b9b54131e1 (patch)
tree3ba735e7fc2a60784f2b39753ee9b7e4676094d9 /guix-data-service
parentb19227c0863a701a3b7e411410ad983e6242e840 (diff)
downloaddata-service-c59d90c26be0ccf13d82afd15a65e0b9b54131e1.tar
data-service-c59d90c26be0ccf13d82afd15a65e0b9b54131e1.tar.gz
Make the dumps page work when dumps is a symlink
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/web/dumps/controller.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix-data-service/web/dumps/controller.scm b/guix-data-service/web/dumps/controller.scm
index 8f70837..70b6fe9 100644
--- a/guix-data-service/web/dumps/controller.scm
+++ b/guix-data-service/web/dumps/controller.scm
@@ -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)))))