aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2020-07-27 13:33:39 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2020-07-27 13:35:49 +0200
commitbc76f8b1f9a74c0f187022991b633cc1820944c7 (patch)
treed9e19809e6491408b2447011583ea56e8d032e1f
parent069da2433e429a6b9b2a0d2a4bea40418d465c4d (diff)
downloadguix-bc76f8b1f9a74c0f187022991b633cc1820944c7.tar.gz
guix-bc76f8b1f9a74c0f187022991b633cc1820944c7.zip
upstream: Handle the case where the file name has no extension.
Fixes <https://bugs.gnu.org/42504>. Reported by Alexandru-Sergiu Marton <brown121407@posteo.ro>. * guix/upstream.scm (package-update/url-fetch): Handle the case where the file name has no extension.
-rw-r--r--guix/upstream.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index ca184601b2..6584d5e4c4 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -369,7 +369,7 @@ SOURCE, an <upstream-source>."
(let*-values (((archive-type)
(match (and=> (package-source package) origin-uri)
((? string? uri)
- (let ((type (file-extension (basename uri))))
+ (let ((type (or (file-extension (basename uri)) "")))
;; Sometimes we have URLs such as
;; "https://github.com/…/tarball/v0.1", in which case
;; we must not consider "1" as the extension.