Revert "Windows - JSON DB fixes - Forcing utf-8 for json DB read/writes should solve windows saving/loading problems. (#3615 #3611)"

This reverts commit e2b407c6f3.
This commit is contained in:
dgtlmoon
2025-11-10 13:31:51 +01:00
parent c58a97f69d
commit caffd804fe
10 changed files with 25 additions and 34 deletions

View File

@@ -101,12 +101,12 @@ def init_app_secret(datastore_path):
path = os.path.join(datastore_path, "secret.txt")
try:
with open(path, "r", encoding='utf-8') as f:
with open(path, "r") as f:
secret = f.read()
except FileNotFoundError:
import secrets
with open(path, "w", encoding='utf-8') as f:
with open(path, "w") as f:
secret = secrets.token_hex(32)
f.write(secret)