mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
deduplicate: Use 'sendfile' only with file ports.
Fixes a regression introduced in b129026e2e
.
* guix/store/deduplication.scm (dump-file/deduplicate): Use 'sendfile'
only when INPUT' is a file port.
This commit is contained in:
parent
61b7e96877
commit
7866294e32
1 changed files with 4 additions and 1 deletions
|
@ -262,7 +262,10 @@ (define (dump-and-compute-hash)
|
|||
(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)))
|
||||
|
|
Loading…
Reference in a new issue