aboutsummaryrefslogtreecommitdiff
path: root/client/system/settings.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/system/settings.gd')
-rw-r--r--client/system/settings.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/system/settings.gd b/client/system/settings.gd
index 1cacfce9..43613de0 100644
--- a/client/system/settings.gd
+++ b/client/system/settings.gd
@@ -105,6 +105,7 @@ static func write(key: String, value):
else: write_unchecked(key, value)
static func load(path: String):
+ print("Loading settings from %s" % path)
tree = get_root()
loaded_path = path
var changed = {}
@@ -116,6 +117,7 @@ static func load(path: String):
static func save():
var changed = {}
tree.save(changed)
+ DirAccess.make_dir_recursive_absolute(loaded_path.rsplit("/", true, 1)[0])
var f = FileAccess.open(loaded_path, FileAccess.WRITE)
f.store_string(JSON.stringify(changed))