]> git.eshelyaron.com Git - emacs.git/commitdiff
Make package-archives URL treatment slighty laxer
authorRobert Pluim <rpluim@gmail.com>
Tue, 1 Mar 2022 10:34:11 +0000 (11:34 +0100)
committerRobert Pluim <rpluim@gmail.com>
Mon, 25 Jul 2022 13:35:30 +0000 (15:35 +0200)
'package-archives' URLs are expected to end in '/', but we can
cater for people typoing that by using 'url-expand-file-name'.

* lisp/emacs-lisp/package.el (package--with-response-buffer-1): Use
'url-expand-file-name' instead of 'concat'.

lisp/emacs-lisp/package.el

index 5ea0c819e93b188ded10f5b1d582a0ad6fc0002b..b25865f429f952d82da86d86c121bfb1060ff860 100644 (file)
@@ -1325,7 +1325,7 @@ errors signaled by ERROR-FORM or by BODY).
 
 (cl-defun package--with-response-buffer-1 (url body &key async file error-function noerror &allow-other-keys)
   (if (string-match-p "\\`https?:" url)
-        (let ((url (concat url file)))
+        (let ((url (url-expand-file-name file url)))
           (if async
               (package--unless-error #'ignore
                 (url-retrieve