From: DeaDDooMER Date: Sat, 15 Jun 2019 21:43:06 +0000 (+0300) Subject: flush called only for exclusive-mode files X-Git-Tag: v0.2~18 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=7d831abc12050416777f2a9e6d352950af688560;p=cpc.git flush called only for exclusive-mode files --- diff --git a/src/posix/generic/Host/Mod/Files.cp b/src/posix/generic/Host/Mod/Files.cp index 19517f2..8b0fc00 100644 --- a/src/posix/generic/Host/Mod/Files.cp +++ b/src/posix/generic/Host/Mod/Files.cp @@ -141,7 +141,7 @@ MODULE HostFiles; PROCEDURE (f: File) Flush; VAR res: unistd.int; BEGIN - IF f.state # closed THEN + IF f.state = exclusive THEN res := unistd.fsync(f.fd); ASSERT(res = 0, 100) END