1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

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).
This commit is contained in:
Eli Zaretskii 2013-02-19 16:34:32 +01:00 committed by Andy Wingo
parent 0725031fe3
commit 854ada4f1a

View file

@ -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)