]> git.eshelyaron.com Git - emacs.git/commitdiff
* Do not fail if more then one level of directories has to be created
authorAndrea Corallo <akrl@sdf.org>
Sat, 15 Aug 2020 09:29:06 +0000 (11:29 +0200)
committerAndrea Corallo <akrl@sdf.org>
Mon, 17 Aug 2020 16:04:22 +0000 (18:04 +0200)
* lisp/emacs-lisp/comp.el (native-compile-async): Call
make-directory if necessary.

lisp/emacs-lisp/comp.el

index 99bf30a4eeee8b61464493ada7dd9258a46c68de..802466550dc0f644eaa150958fbe99a7a17cbad0 100644 (file)
@@ -2748,9 +2748,9 @@ queued with LOAD %"
                                   comp-deferred-compilation-black-list)))
           (let* ((out-filename (comp-el-to-eln-filename file))
                  (out-dir (file-name-directory out-filename)))
-            (if (or (file-writable-p out-filename)
-                    (and (not (file-exists-p out-dir))
-                         (file-writable-p (substring out-dir 0 -1))))
+            (unless (file-exists-p out-dir)
+              (make-directory out-dir t))
+            (if (file-writable-p out-filename)
                 (setf comp-files-queue
                       (append comp-files-queue `((,file . ,load))))
               (display-warning 'comp