GNU bug report logs -
#41489
`package-dir-info' fails on a directory with a non-saved file
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>
Date: Sat, 23 May 2020 17:51:02 UTC
Severity: normal
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 41489 <at> debbugs.gnu.org (full text, mbox):
Paul Pogonyshev <pogonyshev <at> gmail.com> writes:
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 9a6d1d7319..99ba5d7107 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -1181,7 +1181,9 @@ package-dir-info
> info)
> (while files
> (with-temp-buffer
> - (insert-file-contents (pop files))
> + ;; Skip unreadable files, e.g. locks for unsaved `.el'
> + ;; buffers (bug#41489).
> + (ignore-errors (insert-file-contents (pop files)))
> ;; When we find the file with the data,
> (when (setq info (ignore-errors (package-buffer-info)))
> ;; stop looping,
Do we really want to ignore *any* error from insert-file-contents here?
Should we really run package-buffer-info if inserting the file fails?
Won't that reach (error "Package lacks a file header") and signal an
error anyways, just a different and more cryptic one?
Best regards,
Stefan Kangas
This bug report was last modified 3 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.