From: Andrea Corallo Date: Mon, 7 Sep 2020 21:13:28 +0000 (+0200) Subject: * Do not crash compilation if user eln-cache wasn't already created. X-Git-Tag: emacs-28.0.90~2727^2~456 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc4b50ce0b52d8fcade1e04aabd92409858fcfc2;p=emacs.git * 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. --- 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)." `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos)) for dir in (butlast comp-eln-load-path) ; Skip last dir. do (cl-loop - for f in (directory-files (concat dir comp-native-version-dir) t regexp - t) + with full-dir = (concat dir comp-native-version-dir) + for f in (when (file-exists-p full-dir) + (directory-files full-dir t regexp t)) do (comp-delete-or-replace-file f)))) (defun comp-delete-or-replace-file (oldfile &optional newfile)