>From f865dfc57978ffe97501bb0edd2097179a26e365 Mon Sep 17 00:00:00 2001 From: Kooda Date: Sun, 31 Mar 2019 12:49:22 +0200 Subject: [PATCH] Reset port EOF flag when seeking --- posix-common.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posix-common.scm b/posix-common.scm index bfd77941..53ef3c28 100644 --- a/posix-common.scm +++ b/posix-common.scm @@ -357,8 +357,9 @@ EOF (##sys#check-fixnum pos 'set-file-position!) (##sys#check-fixnum whence 'set-file-position!) (unless (cond ((port? port) - (and (eq? (##sys#slot port 7) 'stream) - (##core#inline "C_fseek" port pos whence) ) ) + (when (eq? (##sys#slot port 7) 'stream) + (##sys#setislot port 6 #f) ;; Reset EOF status + (##core#inline "C_fseek" port pos whence) ) ) ((fixnum? port) (##core#inline "C_lseek" port pos whence)) (else -- 2.20.1