From 854ada4f1af8d72859b77e8764729f3cca45460a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 19 Feb 2013 16:34:32 +0100 Subject: [PATCH] Fix startup of guile.exe on MS-Windows. * module/system/base/compile.scm (call-with-output-file/atomic): Call close-port before deleting the temporary file name, otherwise deletion fails on MS-Windows (cannot delete a file that is still open). --- module/system/base/compile.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index f3e464182..db05d1790 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -48,7 +48,7 @@ thunk (lambda () #t)))) -;; (put 'call-with-output-file/atomic 'scheme-indent-function 1) +;; emacs: (put 'call-with-output-file/atomic 'scheme-indent-function 1) (define* (call-with-output-file/atomic filename proc #:optional reference) (let* ((template (string-append filename ".XXXXXX")) (tmp (mkstemp! template))) @@ -61,6 +61,7 @@ (close-port tmp) (rename-file template filename)) (lambda args + (close-port tmp) (delete-file template))))))) (define (ensure-language x)