mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 01:49:59 -04:00
Read launcher.json saved with a BOM, and keep a copy of one that is not valid JSON.
The docs ask players to edit the file by hand (github_token, feed_repo). A BOM, which an editor may add, made the file unreadable and every setting, the game folder included, fell back to its default, so the launcher showed the first run again; a typo did the same and the next save overwrote what the player wrote. The file is now read with utf-8-sig, and a file that is still no JSON is copied to launcher.json.bad and named in the log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,9 @@ class Context:
|
||||
self._file = None
|
||||
self.log(f'--- NX2navi launcher {self.version} ({"checkout" if self.layout.dev else "release"}) in '
|
||||
f'{self.layout.root}')
|
||||
if self.settings.unreadable:
|
||||
self.log(f'{self.layout.settings} is not valid JSON: the settings start from their defaults; the file as '
|
||||
'it was is kept as launcher.json.bad')
|
||||
|
||||
def log(self, line):
|
||||
stamp = time.strftime('%H:%M:%S')
|
||||
|
||||
Reference in New Issue
Block a user