Skip to content

Commit

Permalink
make sure USER_DATA_PATH exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bleykauf committed Nov 21, 2023
1 parent 47f8c58 commit 44c43f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions linien-gui/linien_gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __iter__(self) -> Iterator[Tuple[str, Setting]]:

def save_settings(settings: Settings) -> None:
data = {name: setting.value for name, setting in settings}
USER_DATA_PATH.mkdir(parents=True, exist_ok=True)
with open(USER_DATA_PATH / "settings.json", "w") as f:
json.dump(data, f, indent=0)

Expand Down

0 comments on commit 44c43f4

Please sign in to comment.