We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ba9349 commit d7c7323Copy full SHA for d7c7323
g13gui/model/prefsstore.py
@@ -1,6 +1,8 @@
1
import json
2
import threading
3
4
+from pathlib import Path
5
+
6
from g13gui.model.prefs import Preferences
7
from g13gui.common import PROFILES_CONFIG_PATH
8
@@ -23,6 +25,13 @@ def storePrefs(prefs):
23
25
with PreferencesStore.SaveLock:
24
26
prefsDict = prefs.saveToDict()
27
28
+ # make each directory in turn
29
+ partialpath = Path()
30
+ for part in PROFILES_CONFIG_PATH.parent.parts:
31
+ partialpath = partialpath / part
32
+ if not partialpath.exists():
33
+ partialpath.mkdir()
34
35
with open(PROFILES_CONFIG_PATH, 'w') as f:
36
f.write(json.dumps(prefsDict, default=str))
37
f.flush()
0 commit comments