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 30, 2023
1 parent 9773804 commit daa1a3a
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 @@ -117,6 +117,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 daa1a3a

Please sign in to comment.