From b81f937e60b2fb499820e708d1ff4ba349df5f1a Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 27 Apr 2025 17:28:57 +0200 Subject: [PATCH] Do a deep-copy when installing a package from a local package * lisp/emacs-lisp/package.el (package-unpack, package-dir-info): Call 'directory-files-recursively' with appropriate arguments. (Bug#78017) --- lisp/emacs-lisp/package.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index a255778af64..66f6b795a5e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1007,8 +1007,7 @@ untar into a directory named DIR; otherwise, signal an error." ('dir (make-directory pkg-dir t) (let ((file-list - (directory-files - default-directory 'full "\\`[^.].*\\.el\\'" 'nosort))) + (directory-files-recursively default-directory "" nil))) (dolist (source-file file-list) (let ((target-el-file (expand-file-name (file-name-nondirectory source-file) pkg-dir))) @@ -1252,7 +1251,7 @@ The return result is a `package-desc'." (with-temp-buffer (insert-file-contents desc-file) (package--read-pkg-desc 'dir)) - (let ((files (directory-files default-directory t "\\.el\\'" t)) + (let ((files (directory-files-recursively default-directory "\\.el\\'")) info) (while files (with-temp-buffer