aboutsummaryrefslogtreecommitdiff
path: root/nar-herder/storage.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-02-02 08:29:50 +0000
committerChristopher Baines <mail@cbaines.net>2022-02-02 08:29:50 +0000
commit4cc884f5a478f9ca180a9a9951063684d3eaf357 (patch)
treec0fffa87b45adc6350db1a54a7d550e4e133ef28 /nar-herder/storage.scm
parent28b67c85acefc578536bf849cb748bd9345ee3b9 (diff)
downloadnar-herder-4cc884f5a478f9ca180a9a9951063684d3eaf357.tar
nar-herder-4cc884f5a478f9ca180a9a9951063684d3eaf357.tar.gz
Decode the URLs for narinfo-files
As they're not percent encoded on the filesystem.
Diffstat (limited to 'nar-herder/storage.scm')
-rw-r--r--nar-herder/storage.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm
index 47dbb26..70c1877 100644
--- a/nar-herder/storage.scm
+++ b/nar-herder/storage.scm
@@ -44,7 +44,8 @@
(every (lambda (file)
(file-exists?
(string-append storage-root
- (assq-ref file 'url))))
+ (uri-decode
+ (assq-ref file 'url)))))
narinfo-files)))
(define (get-storage-size storage-root)
@@ -107,7 +108,8 @@
(database-map-all-narinfo-files
database
(lambda (file)
- (let* ((url (assq-ref file 'url))
+ (let* ((url (uri-decode
+ (assq-ref file 'url)))
(stored? (hash-ref files-hash url)))
(when stored?
;; Delete the hash entry, so