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:
parent
0725031fe3
commit
854ada4f1a
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue