From: Andrea Corallo Date: Sat, 15 Aug 2020 09:29:06 +0000 (+0200) Subject: * Do not fail if more then one level of directories has to be created X-Git-Tag: emacs-28.0.90~2727^2~492 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=377ffdb528e75f7e02be5f0305cdf326da0dc451;p=emacs.git * Do not fail if more then one level of directories has to be created * lisp/emacs-lisp/comp.el (native-compile-async): Call make-directory if necessary. --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 99bf30a4eee..802466550dc 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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