]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)
authorAndrea Corallo <akrl@sdf.org>
Sat, 10 Oct 2020 08:15:21 +0000 (10:15 +0200)
committerAndrea Corallo <akrl@sdf.org>
Sat, 10 Oct 2020 08:29:17 +0000 (10:29 +0200)
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Try to create
the eln-cache dir if this is not existing, if fails to do that
move on to the next one.

lisp/emacs-lisp/comp.el

index 0445fc085e1d7f060281e2b585a546e106fd50cf..dbd4cef1fc713a4ea7e838703b4e36c02a76e176 100644 (file)
@@ -2603,11 +2603,15 @@ Return the its filename if found or nil otherwise."
     (native-compile
      trampoline-sym nil
      (cl-loop
-      for dir in comp-eln-load-path
+      for load-dir in comp-eln-load-path
+      for dir = (concat load-dir comp-native-version-dir)
       for f = (expand-file-name
                (comp-trampoline-filename subr-name)
-               (concat dir
-                       comp-native-version-dir))
+               dir)
+      unless (file-exists-p dir)
+        do (ignore-errors
+             (make-directory dir t)
+             (cl-return f))
       when (file-writable-p f)
         do (cl-return f)
       finally (error "Cannot find suitable directory for output in \