]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix byte compilation of files with leading directories
authorEli Zaretskii <eliz@gnu.org>
Sat, 2 Dec 2017 11:29:39 +0000 (13:29 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 2 Dec 2017 11:29:39 +0000 (13:29 +0200)
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename
of target-file to make-temp-file, in case target-file includes a
leading directory that might not exist under TMPDIR.  See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
for the details.

lisp/emacs-lisp/bytecomp.el

index e5a1ea782e8a388a6dcb9051e4d0dd807701057d..f69ac7f342a3629216ef3ec200fce7dde1c9ce40 100644 (file)
@@ -1931,7 +1931,8 @@ The value is non-nil if there were no errors, nil if errors."
                       ;; process is trying to load target-file (eg in a
                       ;; parallel bootstrap), it does not risk getting a
                       ;; half-finished file.  (Bug#4196)
-                      (tempfile (make-temp-file target-file))
+                      (tempfile
+                        (make-temp-file (file-name-nondirectory target-file)))
                       (default-modes (default-file-modes))
                       (temp-modes (logand default-modes #o600))
                       (desired-modes (logand default-modes #o666))