diff options
author | 0neGal <mail@0negal.com> | 2022-04-17 20:02:18 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-04-17 20:05:36 +0200 |
commit | 9ae7cc35744b3aa032dc20efeb1b4df463ceb7ab (patch) | |
tree | 17be4067b7b17a74bd26b6db7365adabbe0c9710 | |
parent | 27126d0f269fd0ac2987fa2f90b106f822b73d75 (diff) | |
download | Viper-9ae7cc35744b3aa032dc20efeb1b4df463ceb7ab.tar.gz Viper-9ae7cc35744b3aa032dc20efeb1b4df463ceb7ab.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.
-rw-r--r-- | src/utils.js | 6 |
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) |