aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/store/deduplication.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/store/deduplication.scm b/guix/store/deduplication.scm
index 9953675319..acb6ffcc4a 100644
--- a/guix/store/deduplication.scm
+++ b/guix/store/deduplication.scm
@@ -262,7 +262,10 @@ down the road."
(deduplicate file (dump-and-compute-hash) #:store store)
(call-with-output-file file
(lambda (output)
- (sendfile output input size 0)))))
+ (if (file-port? input)
+ (sendfile output input size 0)
+ (dump-port input output size
+ #:buffer-size %deduplication-minimum-size))))))
(define* (copy-file/deduplicate source target
#:key (store (%store-directory)))