1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 22:41:06 -08:00

Don't prune *.eln files in parent of eln-load-path

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Don't
prune *.eln files in parent directory of `native-comp-eln-load-path'.
* test/lisp/emacs-lisp/comp-tests.el
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
New test.
This commit is contained in:
Stefan Kangas 2022-10-17 15:26:21 +02:00
parent 24b85b10e3
commit 40b734c500
2 changed files with 14 additions and 1 deletions

View file

@ -4334,7 +4334,9 @@ of (commands) to run simultaneously."
;; `invocation-directory'.
(setq dir (expand-file-name dir invocation-directory))
(when (file-exists-p dir)
(dolist (subdir (directory-files dir t))
(dolist (subdir (seq-filter
(lambda (f) (not (string-match (rx "/." (? ".") eos) f)))
(directory-files dir t)))
(when (and (file-directory-p subdir)
(file-writable-p subdir)
(not (equal (file-name-nondirectory