From: dickmao Date: Wed, 4 Aug 2021 08:50:38 +0000 (+0200) Subject: Package archive location needs to be absolute filename X-Git-Tag: emacs-28.0.90~1591^2~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1910800f93cdc5fd9bc657e7f65e9db9c8e94de0;p=emacs.git 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). --- 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")