Don't native compile lock files

* lisp/emacs-lisp/package.el (package--delete-directory):
Exclude lock files in regex.  (Bug#65666)
This commit is contained in:
Joseph Turner 2023-09-02 10:14:22 -07:00 committed by Philip Kaludercic
parent 335631506d
commit 94431c0d2f

View file

@ -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))