]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't native compile lock files
authorJoseph Turner <joseph@breatheoutbreathe.in>
Sat, 2 Sep 2023 17:14:22 +0000 (10:14 -0700)
committerPhilip Kaludercic <philipk@posteo.net>
Sun, 3 Sep 2023 07:02:22 +0000 (09:02 +0200)
* lisp/emacs-lisp/package.el (package--delete-directory):
Exclude lock files in regex.  (Bug#65666)

lisp/emacs-lisp/package.el

index 43842cfea735ca15df1d7277304669a24a7519bf..3a019905960045d32866a54aefa34d8cd187e4a6 100644 (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))