You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try:
with open(
os.path.join(user_data_dir, "Default/Preferences"),
encoding="latin1",
mode="r+",
) as fs:
config = json.load(fs)
if config["profile"]["exit_type"] is not None:
# fixing the restore-tabs-nag
config["profile"]["exit_type"] = None
fs.seek(0, 0)
json.dump(config, fs)
fs.truncate() # the file might be shorter
logger.debug("fixed exit_type flag")
except Exception as e:
logger.debug("did not find a bad exit_type flag ")
Why encoding latin1?
I have a utf-8 encoded settings file.
after overwriting it, there are problems with recoding and it increases in size.
The text was updated successfully, but these errors were encountered:
fix exit_type flag to prevent tab-restore nag
Why encoding latin1?
I have a utf-8 encoded settings file.
after overwriting it, there are problems with recoding and it increases in size.
The text was updated successfully, but these errors were encountered: