mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
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.
This commit is contained in:
parent
8c8499a5e4
commit
dde0d17f8e
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue