[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 11/11: Use source file permissions for compiled files
From: |
Andy Wingo |
Subject: |
[Guile-commits] 11/11: Use source file permissions for compiled files |
Date: |
Tue, 21 Jun 2016 16:10:00 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit dde0d17f8ea1446b737db1fa20d5bc8a5b50ea5d
Author: Andy Wingo <address@hidden>
Date: Tue Jun 21 17:51:07 2016 +0200
Use source file permissions for compiled files
* module/system/base/compile.scm (call-with-output-file/atomic): Use the
permissions of the source file, if available, as the permissions of
the compiled file. Fixes #18477.
---
module/system/base/compile.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index c522b74..e8a8fd9 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -59,7 +59,9 @@
(proc tmp)
;; Chmodding by name instead of by port allows this chmod to
;; work on systems without fchmod, like MinGW.
- (chmod template (logand #o0666 (lognot (umask))))
+ (let ((perms (or (false-if-exception (stat:perms (stat reference)))
+ (lognot (umask)))))
+ (chmod template (logand #o0666 perms)))
(close-port tmp)
(rename-file template filename))
(lambda args
- [Guile-commits] branch stable-2.0 updated (a192c33 -> dde0d17), Andy Wingo, 2016/06/21
- [Guile-commits] 04/11: Fix size measurement in bytevector_large_set, Andy Wingo, 2016/06/21
- [Guile-commits] 02/11: Add reference to the lack of "non-greedy" variants, Andy Wingo, 2016/06/21
- [Guile-commits] 06/11: Fix SRFI-2 (and-let*) implementation., Andy Wingo, 2016/06/21
- [Guile-commits] 07/11: Add SRFI-2 (and-let*) test suite., Andy Wingo, 2016/06/21
- [Guile-commits] 01/11: Remove link to Emacs' regexp syntax, Andy Wingo, 2016/06/21
- [Guile-commits] 09/11: Detect too-old libunistring at configure-time., Andy Wingo, 2016/06/21
- [Guile-commits] 10/11: Document pretty-print #:max-expr-width, Andy Wingo, 2016/06/21
- [Guile-commits] 11/11: Use source file permissions for compiled files,
Andy Wingo <=
- [Guile-commits] 03/11: Fix uri-decode behavior for "+", Andy Wingo, 2016/06/21
- [Guile-commits] 08/11: Update and-let-star.test, Andy Wingo, 2016/06/21
- [Guile-commits] 05/11: Document sigaction + SA_RESTART, Andy Wingo, 2016/06/21