aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nar-herder/cached-compression.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/nar-herder/cached-compression.scm b/nar-herder/cached-compression.scm
index c440493..0e91368 100644
--- a/nar-herder/cached-compression.scm
+++ b/nar-herder/cached-compression.scm
@@ -100,17 +100,20 @@
(let ((files-hash
(assq-ref files-by-compression compression)))
(if (hash-ref files-hash filename)
- (hash-remove! files-hash filename)
+ (begin
+ (hash-remove! files-hash filename)
+
+ `((,compression . ,(+ (assq-ref details 'size)
+ (or (assq-ref result compression)
+ 0)))
+ ,@(alist-delete compression result)))
;; Database entry, but file missing
- (set! database-entries-missing-files
- (cons details
- database-entries-missing-files))))
-
- `((,compression . ,(+ (assq-ref details 'size)
- (or (assq-ref result compression)
- 0)))
- ,@(alist-delete compression result))))
+ (begin
+ (set! database-entries-missing-files
+ (cons details
+ database-entries-missing-files))
+ result)))))
(map
(lambda (compression)
(cons compression 0))