game: Fix Game.save()
This commit is contained in:
@@ -141,8 +141,8 @@ class Game(Gio.SimpleActionGroup):
|
|||||||
|
|
||||||
GAMES_DIR.mkdir(parents=True, exist_ok=True)
|
GAMES_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
path = (GAMES_DIR / self.game_id).with_suffix(".json")
|
path = (GAMES_DIR / self.game_id).with_suffix(".json")
|
||||||
with path.open(encoding="utf-8") as f:
|
with path.open("w", encoding="utf-8") as f:
|
||||||
json.dump(properties, f, indent=4)
|
json.dump(properties, f, indent=4, sort_keys=True)
|
||||||
|
|
||||||
def _remove(self):
|
def _remove(self):
|
||||||
self.removed = True
|
self.removed = True
|
||||||
|
|||||||
Reference in New Issue
Block a user