From 52b24ed7aacb2e879c68e0f51f3b32c1700c9324 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 13 Feb 2026 22:47:40 +0100 Subject: [PATCH] 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) --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index bbc1e8242ac..e262576524e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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,