From 1910800f93cdc5fd9bc657e7f65e9db9c8e94de0 Mon Sep 17 00:00:00 2001 From: dickmao Date: Wed, 4 Aug 2021 10:50:38 +0200 Subject: [PATCH] Package archive location needs to be absolute filename * lisp/emacs-lisp/package.el (package--with-response-buffer-1): Actually check that URL is absolute (bug#49788). --- lisp/emacs-lisp/package.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f1daa8d124a..37dcbe36c8b 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1366,11 +1366,9 @@ errors signaled by ERROR-FORM or by BODY). (kill-buffer buffer) (goto-char (point-min)))))) (package--unless-error body - (let ((url (expand-file-name file url))) - (unless (file-name-absolute-p url) - (error "Location %s is not a url nor an absolute file name" - url)) - (insert-file-contents-literally url))))) + (unless (file-name-absolute-p url) + (error "Location %s is not a url nor an absolute file name" url)) + (insert-file-contents-literally (expand-file-name file url))))) (define-error 'bad-signature "Failed to verify signature") -- 2.39.2