download: Properly parse ftp:// URLs that lack user info.
Fixes a regression introduced in
a4f5423415
.
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.
This commit is contained in:
parent
9909b8b952
commit
6dfd683dc7
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user