aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2020-09-07 23:13:28 +0200
committerAndrea Corallo2020-09-07 23:18:36 +0200
commitdc4b50ce0b52d8fcade1e04aabd92409858fcfc2 (patch)
tree114252e961631801c82804c9e39ff7b5daf0f5a8
parentd344e79be9fb82a38a89c892e24d5ca71fbff810 (diff)
downloademacs-dc4b50ce0b52d8fcade1e04aabd92409858fcfc2.tar.gz
emacs-dc4b50ce0b52d8fcade1e04aabd92409858fcfc2.zip
* Do not crash compilation if user eln-cache wasn't already created.
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Guard against calling `directory-files' on non existent directories.
-rw-r--r--lisp/emacs-lisp/comp.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 129a4dedaf9..cfc5ca55488 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2516,8 +2516,9 @@ sharing the original source filename (including FILE)."
2516 `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos)) 2516 `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
2517 for dir in (butlast comp-eln-load-path) ; Skip last dir. 2517 for dir in (butlast comp-eln-load-path) ; Skip last dir.
2518 do (cl-loop 2518 do (cl-loop
2519 for f in (directory-files (concat dir comp-native-version-dir) t regexp 2519 with full-dir = (concat dir comp-native-version-dir)
2520 t) 2520 for f in (when (file-exists-p full-dir)
2521 (directory-files full-dir t regexp t))
2521 do (comp-delete-or-replace-file f)))) 2522 do (comp-delete-or-replace-file f))))
2522 2523
2523(defun comp-delete-or-replace-file (oldfile &optional newfile) 2524(defun comp-delete-or-replace-file (oldfile &optional newfile)