1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00

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).
This commit is contained in:
dickmao 2021-08-04 10:50:38 +02:00 committed by Lars Ingebrigtsen
parent b8c43b594e
commit 1910800f93

View file

@ -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")