Better cross platform file handling in diff and preview (#1034)

This commit is contained in:
dgtlmoon
2022-10-17 18:36:22 +02:00
committed by GitHub
parent 957a3c1c16
commit 4be0260381
2 changed files with 7 additions and 6 deletions

View File

@@ -158,7 +158,8 @@ class model(dict):
logging.debug("Saving history text {}".format(snapshot_fname))
# in /diff/ we are going to assume for now that it's UTF-8 when reading
# in /diff/ and /preview/ we are going to assume for now that it's UTF-8 when reading
# most sites are utf-8 and some are even broken utf-8
with open(snapshot_fname, 'wb') as f:
f.write(contents)
f.close()