aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2021-12-28 23:50:39 +0100
committerAlystrasz <contact@remyraes.com>2021-12-28 23:50:39 +0100
commita23f5200a0330b24a1f77a63755367148cd0763f (patch)
tree27ec79765e5e91438cefc468d0d577bc88d14b1b /src
parenta4978e160eff00ab387d8217ac53d66ca2794ee3 (diff)
downloadViper-a23f5200a0330b24a1f77a63755367148cd0763f.tar.gz
Viper-a23f5200a0330b24a1f77a63755367148cd0763f.zip
[fix] settings are saved after setpath call on Windows
After game path was set on Windows in first launch, the settings object would not be written to viper.json file, meaning that on next start, settings.gamepath variable would be loaded with a "" value, leading to errors.
Diffstat (limited to 'src')
-rw-r--r--src/utils.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index dde5515..270b57a 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -38,7 +38,7 @@ function setpath(win) {
dialog.showOpenDialog({properties: ["openDirectory"]}).then(res => {
settings.gamepath = res.filePaths[0];
settings.zip = path.join(settings.gamepath + "/northstar.zip");
-
+ saveSettings();
win.webContents.send("newpath", settings.gamepath);
}).catch(err => {console.error(err)})
}