From bf9b972843113dd1fb416f5bd7cb127eaf4927d0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Dec 2017 13:29:39 +0200 Subject: Fix byte compilation of files with leading directories * 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e5a1ea782e8..f69ac7f342a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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)) -- cgit v1.2.3