diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-28 13:27:56 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-28 13:30:09 +0200 |
commit | 6dfd683dc742ebb80983137f80a457af38ca7d8d (patch) | |
tree | c0b9b95246dd0b438cc1538ce75c704cf0bd0040 /guix/build/download.scm | |
parent | 9909b8b952d849e22fc93e4ebf7f74614f3489a0 (diff) |
download: Properly parse ftp:// URLs that lack user info.
Fixes a regression introduced in
a4f542341511f33ece18d16b68118214da8143ec.
Reported by Hartmut Goebel.
* guix/build/download.scm (ftp-fetch): Account for the case where
'uri-userinfo' returns #f. Remove the case where it returns "" since
that cannot happen.
Diffstat (limited to 'guix/build/download.scm')
-rw-r--r-- | guix/build/download.scm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm index c5dddf83de..e3d5244590 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -241,10 +241,8 @@ and 'guix publish', something like (define* (ftp-fetch uri file #:key timeout) "Fetch data from URI and write it to FILE. Return FILE on success. Bail out if the connection could not be established in less than TIMEOUT seconds." - (let* ((userinfo (string-split (uri-userinfo uri) #\:)) - (conn (match userinfo - (("") - (ftp-open (uri-host uri) #:timeout timeout)) + (let* ((conn (match (and=> (uri-userinfo uri) + (cut string-split <> #\:)) (((? string? user)) (ftp-open (uri-host uri) #:timeout timeout #:username user)) |