From cfe24bc4deef6f52ad3e07ffc513160890db4ff3 Mon Sep 17 00:00:00 2001 From: Jason Earl Date: Sun, 10 Mar 2013 20:12:05 +0100 Subject: [PATCH] use chmod portably in (system base compile) * module/system/base/compile.scm (call-with-output-file/atomic): Call chmod with the file name instead of the port. --- 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 db05d1790..c522b74b5 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -57,7 +57,9 @@ (with-throw-handler #t (lambda () (proc tmp) - (chmod tmp (logand #o0666 (lognot (umask)))) + ;; Chmodding by name instead of by port allows this chmod to + ;; work on systems without fchmod, like MinGW. + (chmod template (logand #o0666 (lognot (umask)))) (close-port tmp) (rename-file template filename)) (lambda args -- 2.20.1