me
/
guix
Archived
1
0
Fork 0

download: 'download-to-store' accepts plain file names.

* guix/download.scm (download-to-store): When URI is #f, assume that URL
  is a file name, and handle it.
master
Ludovic Courtès 2014-03-11 22:09:31 +01:00
parent 6f58d58243
commit d91a879121
1 changed files with 3 additions and 2 deletions

View File

@ -255,8 +255,9 @@ omitted. Write progress reports to LOG."
(define uri (define uri
(string->uri url)) (string->uri url))
(if (memq (uri-scheme uri) '(file #f)) (if (or (not uri) (memq (uri-scheme uri) '(file #f)))
(add-to-store store name #f "sha256" (uri-path uri)) (add-to-store store name #f "sha256"
(if uri (uri-path uri) url))
(call-with-temporary-output-file (call-with-temporary-output-file
(lambda (temp port) (lambda (temp port)
(let ((result (let ((result