aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2021-12-28 17:08:00 +0100
committer0neGal <mail@0negal.com>2021-12-28 17:08:00 +0100
commitfccb5815decce6257b8f04cb842a40d6d02110e7 (patch)
treef7a3f4bf3ccca809aa6ae3d838eafda230088dc0
parentbce88c1def1b0d8c8f03595c6a84196173304f34 (diff)
downloadViper-fccb5815decce6257b8f04cb842a40d6d02110e7.tar.gz
Viper-fccb5815decce6257b8f04cb842a40d6d02110e7.zip
removed settings.file
We now just use a fixed string ("viper.json")
-rw-r--r--src/app/main.js5
-rw-r--r--src/utils.js5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/app/main.js b/src/app/main.js
index be13beb..d390962 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -4,7 +4,6 @@ const { ipcRenderer } = require("electron");
var settings = {
gamepath: "",
- file: "viper.json",
zip: "/northstar.zip",
excludes: [
"ns_startup_args.txt",
@@ -12,8 +11,8 @@ var settings = {
]
}
-if (fs.existsSync(settings.file)) {
- settings = {...settings, ...JSON.parse(fs.readFileSync(settings.file, "utf8"))};
+if (fs.existsSync("viper.json")) {
+ settings = {...settings, ...JSON.parse(fs.readFileSync("viper.json", "utf8"))};
settings.zip = path.join(settings.gamepath + "/northstar.zip");
} else {
alert("Game path is not set! Please select the path!");
diff --git a/src/utils.js b/src/utils.js
index a5cb461..85ce5ce 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -16,7 +16,6 @@ process.chdir(app.getPath("appData"));
var settings = {
gamepath: "",
- file: "viper.json",
zip: "/northstar.zip",
excludes: [
"ns_startup_args.txt",
@@ -24,8 +23,8 @@ var settings = {
]
}
-if (fs.existsSync(settings.file)) {
- settings = {...settings, ...JSON.parse(fs.readFileSync(settings.file, "utf8"))};
+if (fs.existsSync("viper.json")) {
+ settings = {...settings, ...JSON.parse(fs.readFileSync("viper.json", "utf8"))};
settings.zip = path.join(settings.gamepath + "/northstar.zip");
} else {
console.log("Game path is not set! Please select the path.");