From d91a879121485b079796ab5174468bf4c034ae40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 11 Mar 2014 22:09:31 +0100 Subject: [PATCH] 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. --- guix/download.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/download.scm b/guix/download.scm index 0889928d3a592e138530c5c011d2f9aff514e8f1..2cb0740897bb0dcbddb11cc839ea07b6304712d0 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -255,8 +255,9 @@ omitted. Write progress reports to LOG." (define uri (string->uri url)) - (if (memq (uri-scheme uri) '(file #f)) - (add-to-store store name #f "sha256" (uri-path uri)) + (if (or (not uri) (memq (uri-scheme uri) '(file #f))) + (add-to-store store name #f "sha256" + (if uri (uri-path uri) url)) (call-with-temporary-output-file (lambda (temp port) (let ((result