From 91a7fde45654b2d78cd791542e6a18dbbedd7297 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 22 Jun 2013 16:10:25 +0200 Subject: download: Don't fail when abbreviating `file://' URIs. * guix/build/download.scm (uri-abbreviation)[elide-path]: Handle the case where URI has no `host' part. --- guix/build/download.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'guix/build') diff --git a/guix/build/download.scm b/guix/build/download.scm index dcce0bfc89..ac2086d96e 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -65,8 +65,11 @@ (define uri-as-string (define (elide-path) (let ((path (uri-path uri))) - (string-append (symbol->string (uri-scheme uri)) - "://" (uri-host uri) + (string-append (symbol->string (uri-scheme uri)) "://" + + ;; `file' URIs have no host part. + (or (uri-host uri) "") + (string-append "/.../" (basename path))))) (if (> (string-length uri-as-string) max-length) -- cgit v1.2.3