Only check regular files for package metadata

* lisp/emacs-lisp/package.el (package-dir-info): Do not check
files that do not satisfy 'file-regular-p' when trying to find
the file with the package metadata.  (Bug#79742)
This commit is contained in:
Philip Kaludercic 2026-02-13 22:47:40 +01:00
parent 567155047c
commit 52b24ed7aa
No known key found for this signature in database

View file

@ -1105,7 +1105,7 @@ The return result is a `package-desc'."
(dolist (file (sort files :key #'length))
;; The file may be a link to a nonexistent file; e.g., a
;; lock file.
(when (file-exists-p file)
(when (and (file-readable-p file) (file-regular-p file))
(with-temp-buffer
(insert-file-contents file)
;; When we find the file with the data,