From 94431c0d2f645ff509af2fc841fa264492c8ac93 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Sat, 2 Sep 2023 10:14:22 -0700 Subject: [PATCH] Don't native compile lock files * lisp/emacs-lisp/package.el (package--delete-directory): Exclude lock files in regex. (Bug#65666) --- lisp/emacs-lisp/package.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 43842cfea73..3a019905960 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2487,7 +2487,9 @@ Clean-up the corresponding .eln files if Emacs is native compiled." (when (featurep 'native-compile) (cl-loop - for file in (directory-files-recursively dir "\\.el\\'") + for file in (directory-files-recursively dir + ;; Exclude lockfiles + (rx bos (or (and "." (not "#")) (not ".")) (* nonl) ".el" eos)) do (comp-clean-up-stale-eln (comp-el-to-eln-filename file)))) (if (file-symlink-p (directory-file-name dir)) (delete-file (directory-file-name dir)) -- 2.39.2