aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-28 13:29:11 +0100
committer0neGal <mail@0negal.com>2021-12-28 13:29:11 +0100
commitb2bdedddad5001db625478f91ff5d8e86b79f87d (patch)
tree53a91e0518ccdf3712ba102ab1825c9aaca7b510
parent78add7218f28c0391cb4415b119d29b7e210b07c (diff)
downloadViper-b2bdedddad5001db625478f91ff5d8e86b79f87d.tar.gz
Viper-b2bdedddad5001db625478f91ff5d8e86b79f87d.zip
fix initial config not setting zip variable
A bug stopped the settings.zip variable from being set after choosing the path, this resulted in Viper trying to save the zip to root. This was only on first launch, relaunching would fix this. For obvious reasons.
-rw-r--r--src/utils.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index 6b6fbfa..85cc26e 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -33,8 +33,10 @@ function setpath(win) {
settings.gamepath = cli.param("setpath");
} else {
dialog.showOpenDialog({properties: ["openDirectory"]}).then(res => {
- win.webContents.send("newpath", res.filePaths[0]);
settings.gamepath = res.filePaths[0];
+ settings.zip = path.join(settings.gamepath + "/northstar.zip");
+
+ win.webContents.send("newpath", settings.gamepath);
}).catch(err => {console.error(err)})
}