]> git.eshelyaron.com Git - emacs.git/commitdiff
* Do not crash compilation if user eln-cache wasn't already created.
authorAndrea Corallo <akrl@sdf.org>
Mon, 7 Sep 2020 21:13:28 +0000 (23:13 +0200)
committerAndrea Corallo <akrl@sdf.org>
Mon, 7 Sep 2020 21:18:36 +0000 (23:18 +0200)
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Guard
against calling `directory-files' on non existent directories.

lisp/emacs-lisp/comp.el

index 129a4dedaf9be73b9a2f9d57222f29f6c7462c5d..cfc5ca5548850b7635bff0e0a761b8aa33dd49fa 100644 (file)
@@ -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)