narinfo: Do not repeat slash when building nar URLs.

* guix/narinfo.scm (narinfo-maker): When one of URLS is relative, do not
repeat trailing slash if it's already present in CACHE-URL.
This commit is contained in:
Ludovic Courtès 2021-12-11 23:26:06 +01:00
parent e68466de12
commit cba0395c99
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 1 deletions

View File

@ -144,7 +144,9 @@ must contain the original contents of a narinfo file."
(map (lambda (url)
(or (string->uri url)
(string->uri
(string-append cache-url "/" url))))
(if (string-suffix? "/" cache-url)
(string-append cache-url url)
(string-append cache-url "/" url)))))
urls)
compressions
(match file-sizes