aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2022-02-02 09:16:40 +0000
committerChristopher Baines <mail@cbaines.net>2022-02-02 09:16:40 +0000
commit3fdd97406d41e1d4d09d87d3e3fc31ea11f66937 (patch)
tree958d12462b08b9717f120c6876554c3e41963934
parentc0b705fc3956a5d81a9e3dc6f8f2ab4d2e16183c (diff)
downloadnar-herder-3fdd97406d41e1d4d09d87d3e3fc31ea11f66937.tar
nar-herder-3fdd97406d41e1d4d09d87d3e3fc31ea11f66937.tar.gz
Decode nar urls when deleting nar files
-rw-r--r--nar-herder/storage.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm
index c88ace7..c23a124 100644
--- a/nar-herder/storage.scm
+++ b/nar-herder/storage.scm
@@ -70,10 +70,10 @@
0 ; Start counting at 0
storage-root))
-(define (remove-nar-from-storage storage-root nar-file-url)
+(define (remove-nar-from-storage storage-root nar-file)
(let* ((filename
- (string-append storage-root "/" nar-file-url)))
- (log-msg 'INFO "removing nar " nar-file-url)
+ (string-append storage-root "/" nar-file)))
+ (log-msg 'INFO "removing nar " nar-file)
(delete-file filename))
#t)
@@ -191,7 +191,8 @@
(begin
(remove-nar-from-storage
storage-root
- (assq-ref nar-to-consider 'url))
+ (uri-decode
+ (assq-ref nar-to-consider 'url)))
(let ((storage-size-estimate
(- storage-size