emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 c6c05e2: Unbreak building Emacs on FreeBSD


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-26 c6c05e2: Unbreak building Emacs on FreeBSD
Date: Fri, 19 Jan 2018 10:33:28 -0500 (EST)

branch: emacs-26
commit c6c05e2aa9d28a74df0b61b4f56745f1248a779e
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 lisp/emacs-lisp/bytecomp.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index acba9e2..3c9c62e 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]