diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-01-19 17:31:54 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-01-19 17:31:54 +0200 |
commit | c6c05e2aa9d28a74df0b61b4f56745f1248a779e (patch) | |
tree | 5aaf6109b80d8d4df1849912a6b4a0822ad442fe /lisp/emacs-lisp/bytecomp.el | |
parent | a41ad3df9ff4377a99439b4541535c522fe2f845 (diff) | |
download | emacs-c6c05e2aa9d28a74df0b61b4f56745f1248a779e.tar.gz |
Unbreak building Emacs on FreeBSD
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create
the temporary file under temporary-file-directory if the file
being compiled is specified by an absolute file name. This avoids
problems with ACL copying from temporary-file-directory on
FreeBSD. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index acba9e2df5e..3c9c62eb23d 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." ;; parallel bootstrap), it does not risk getting a ;; half-finished file. (Bug#4196) (tempfile - (make-temp-file (file-name-nondirectory target-file))) + ;; If target-file is relative and includes + ;; leading directories, make-temp-file will + ;; assume those leading directories exist + ;; under temporary-file-directory, which might + ;; not be true. So strip leading directories + ;; from relative file names before calling + ;; make-temp-file. + (if (file-name-absolute-p target-file) + (make-temp-file target-file) + (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)) |