Fixed only 'text' logs getting fsynced on write

(html & bbcode were only being writen on closing the memo window)
This commit is contained in:
Dpeta 2022-06-10 21:53:56 +02:00
parent e3bdbf77f4
commit 0e1f676acc

View file

@ -79,9 +79,8 @@ class PesterLog(object):
for (format, t) in modes.items():
f = self.convos[handle][format]
f.write(t+"\r\n")
# flush + fsync force a write, might not be required though.
for (format, t) in modes.items():
# flush + fsync force a write,
# makes sure logs are saved in the case of a crash.
f.flush()
os.fsync(f.fileno())