1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 22:20:24 -08:00

Make package-archives URL treatment slighty laxer

'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'.
This commit is contained in:
Robert Pluim 2022-03-01 11:34:11 +01:00
parent ffe12ff250
commit b86569f130

View 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