mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 08:10:17 +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
|
thunk
|
||||||
(lambda () #t))))
|
(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)
|
(define* (call-with-output-file/atomic filename proc #:optional reference)
|
||||||
(let* ((template (string-append filename ".XXXXXX"))
|
(let* ((template (string-append filename ".XXXXXX"))
|
||||||
(tmp (mkstemp! template)))
|
(tmp (mkstemp! template)))
|
||||||
|
@ -61,6 +61,7 @@
|
||||||
(close-port tmp)
|
(close-port tmp)
|
||||||
(rename-file template filename))
|
(rename-file template filename))
|
||||||
(lambda args
|
(lambda args
|
||||||
|
(close-port tmp)
|
||||||
(delete-file template)))))))
|
(delete-file template)))))))
|
||||||
|
|
||||||
(define (ensure-language x)
|
(define (ensure-language x)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue