summaryrefslogtreecommitdiff
path: root/guix/gnu-maintenance.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-03-18 15:15:44 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-19 13:23:26 +0100
commita0f83602f8333f2e9fa01ee8ad1ce9e073f5b753 (patch)
tree748026316b804a07458e62e1c59f9e88810804dd /guix/gnu-maintenance.scm
parent60d629d777a29b7708d5ced162beced74e1af2dc (diff)
gnu-maintenance: Better handle empty #:directory for 'latest-html-release'.
In particular, this makes sure we don't add a trailing slash when the user specified a 'release-monitoring-url' property for the 'generic-html' updater. * guix/gnu-maintenance.scm (latest-html-release): When DIRECTORY is empty, do not append it.
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r--guix/gnu-maintenance.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 4ba2a5f731..d9c97beb29 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -475,7 +475,9 @@ When FILE->SIGNATURE is omitted or #f, guess the detached signature file name,
if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source
file URL and must return the corresponding signature URL, or #f it signatures
are unavailable."
- (let* ((uri (string->uri (string-append base-url directory "/")))
+ (let* ((uri (string->uri (if (string-null? directory)
+ base-url
+ (string-append base-url directory "/"))))
(port (http-fetch/cached uri #:ttl 3600))
(sxml (html->sxml port))
(links (delete-duplicates (html-links sxml))))