Fixing synchronized-rewrite-file when the file doesn't exist.

This commit is contained in:
Alex Shinn 2015-05-02 22:55:46 +09:00
parent 366dbdb9dc
commit 4c3deea37e

View file

@ -145,6 +145,7 @@
path path
(lambda (fd) (lambda (fd)
(let* ((str (port->string (open-input-file-descriptor fd))) (let* ((str (port->string (open-input-file-descriptor fd)))
(str (if (eof-object? str) (if (pair? o) (car o) "") str))
(res (proc str)) (res (proc str))
(out (open-output-file-descriptor fd))) (out (open-output-file-descriptor fd)))
(set-file-position! out seek/set 0) (set-file-position! out seek/set 0)