From b86569f1302a48d4c402d0cffad75679989f2236 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 1 Mar 2022 11:34:11 +0100 Subject: [PATCH] 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'. --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5ea0c819e93..b25865f429f 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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 -- 2.39.2