diff options
author | Christopher Baines <mail@cbaines.net> | 2024-04-27 16:46:01 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-04-27 16:46:01 +0100 |
commit | e29073354cd59013a6e33110d1724e2a7b5e033c (patch) | |
tree | fb1addc7e683d112cfb4c92c1d4f035e3ec863f6 | |
parent | fb764aa513efd206e175a1c52d737e1e934c3ca1 (diff) | |
download | nar-herder-e29073354cd59013a6e33110d1724e2a7b5e033c.tar nar-herder-e29073354cd59013a6e33110d1724e2a7b5e033c.tar.gz |
Allow storage-root to be #f when calling fold-nar-files
To allow populating metrics when running with no storage.
-rw-r--r-- | nar-herder/storage.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm index fc49b2d..16f7025 100644 --- a/nar-herder/storage.scm +++ b/nar-herder/storage.scm @@ -181,8 +181,10 @@ (uri-decode (assq-ref nar 'url))) (nar-stored? - (file-exists? - (string-append storage-root url)))) + (if storage-root + (file-exists? + (string-append storage-root url)) + #f))) (if nar-stored? (set! stored-files-count (1+ stored-files-count)) |