[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/native-comp-eln-caches 7dd45e5 3/3: * Remove a false permission
From: |
Andrea Corallo |
Subject: |
scratch/native-comp-eln-caches 7dd45e5 3/3: * Remove a false permission related error while native compiling |
Date: |
Sun, 16 Aug 2020 13:02:26 -0400 (EDT) |
branch: scratch/native-comp-eln-caches
commit 7dd45e5b87da42fa9b868822979904fc214fad50
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Remove a false permission related error while native compiling
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Do not crash if
native compiling we have no permission to create the .elc
file. We are not creating it.
---
lisp/emacs-lisp/bytecomp.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 20a481a..507cfe7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2041,7 +2041,8 @@ The value is non-nil if there were no errors, nil if
errors."
(with-current-buffer output-buffer
(goto-char (point-max))
(insert "\n") ; aaah, unix.
- (if (file-writable-p target-file)
+ (if (or (file-writable-p target-file)
+ byte-native-compiling)
;; We must disable any code conversion here.
(progn
(let* ((coding-system-for-write 'no-conversion)
@@ -2050,7 +2051,8 @@ 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 (expand-file-name target-file)))
+ (make-temp-file (when (file-writable-p target-file)
+ (expand-file-name target-file))))
(default-modes (default-file-modes))
(temp-modes (logand default-modes #o600))
(desired-modes (logand default-modes #o666))