aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-01-20 09:48:22 +0200
committerEli Zaretskii2018-01-20 09:48:22 +0200
commitb603affa1fdd6c85cb5513dcc9606fd0b82567f2 (patch)
tree6de39613d1682b964143ffd95352703025792945
parent4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8 (diff)
downloademacs-b603affa1fdd6c85cb5513dcc9606fd0b82567f2.tar.gz
emacs-b603affa1fdd6c85cb5513dcc9606fd0b82567f2.zip
Revert "Fix tempfile creation when byte compiling"
This reverts commit 4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8: * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Put tempfile next to the target file, as was the original intent.
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index f6d259ba9da..700a7c16b58 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1933,7 +1933,17 @@ The value is non-nil if there were no errors, nil if errors."
1933 ;; parallel bootstrap), it does not risk getting a 1933 ;; parallel bootstrap), it does not risk getting a
1934 ;; half-finished file. (Bug#4196) 1934 ;; half-finished file. (Bug#4196)
1935 (tempfile 1935 (tempfile
1936 (make-temp-file (expand-file-name target-file))) 1936 (if (file-name-absolute-p target-file)
1937 (make-temp-file target-file)
1938 ;; If target-file is relative and includes
1939 ;; leading directories, make-temp-file will
1940 ;; assume those leading directories exist
1941 ;; under temporary-file-directory, which might
1942 ;; not be true. So strip leading directories
1943 ;; from relative file names before calling
1944 ;; make-temp-file.
1945 (make-temp-file
1946 (file-name-nondirectory target-file))))
1937 (default-modes (default-file-modes)) 1947 (default-modes (default-file-modes))
1938 (temp-modes (logand default-modes #o600)) 1948 (temp-modes (logand default-modes #o600))
1939 (desired-modes (logand default-modes #o666)) 1949 (desired-modes (logand default-modes #o666))