[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49788: 28.0.50; [PATCH] Package archive location needs to be absolut
From: |
Stefan Monnier |
Subject: |
bug#49788: 28.0.50; [PATCH] Package archive location needs to be absolute |
Date: |
Sat, 31 Jul 2021 12:32:48 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> index f1daa8d124..dfda201af6 100644
>> --- a/lisp/emacs-lisp/package.el
>> +++ b/lisp/emacs-lisp/package.el
>> @@ -1366,10 +1366,10 @@ package--with-response-buffer-1
>> (kill-buffer buffer)
>> (goto-char (point-min))))))
>> (package--unless-error body
>> + (unless (file-name-absolute-p url)
>> + (error "Location %s is not a url nor an absolute file name"
>> + url))
>> (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)))))
>>
>> (define-error 'bad-signature "Failed to verify signature")
>
> Hmm.. if we require it to be an absolute file name, why run it through
> expand-file-name?
>
> Stefan, any comments?
It's not the same `url` we're talking about.
The `file` argument is relative, and the `url` argument should be
absolute.
Stefan