bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Eli Zaretskii
Subject: bug#49788: 28.0.50; [PATCH] Package archive location needs to be absolute
Date: Sat, 31 Jul 2021 09:27:19 +0300

> From: dick.r.chiang@gmail.com
> Date: Fri, 30 Jul 2021 21:15:40 -0400
> 
> Now that bug#48137 can change default-directory in the middle
> of `package-install-file`, the error regarding package archive
> locations needing to be absolute is now important enough that
> it actually needs to trigger.
> 
> 
> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]