aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-04-17 20:02:18 +0200
committer0neGal <mail@0negal.com>2022-04-17 20:05:36 +0200
commit9ae7cc35744b3aa032dc20efeb1b4df463ceb7ab (patch)
tree17be4067b7b17a74bd26b6db7365adabbe0c9710 /src
parent27126d0f269fd0ac2987fa2f90b106f822b73d75 (diff)
downloadViper-linux-launch-testing.tar.gz
Viper-linux-launch-testing.zip
fixed gamepathlost errors on first launchlinux-launch-testing
Because viper.json doesn't exist it also means settings.gamepath is null, which triggers the gamepathlost message.
Diffstat (limited to 'src')
-rw-r--r--src/utils.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index 6a45bd7..89bcf92 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -787,7 +787,11 @@ setInterval(() => {
if (gamepathExists()) {
ipcMain.emit("guigetmods");
} else {
- ipcMain.emit("gamepathlost");
+ if (fs.existsSync("viper.json")) {
+ if (settings.gamepath != "") {
+ ipcMain.emit("gamepathlost");
+ }
+ }
}
}, 1500)