From d9056a9f78ab7318ac6edae5b5e6cc4a269705ce Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 31 Dec 2023 21:22:46 +0100 Subject: [PATCH] Removed "DorianTech" from mod.info. Also don't crash, when broken SVR.JS config is loaded. --- .gitignore | 1 - index.js | 8 +++++++- mod.info | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 47d6e3b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -commit.sh diff --git a/index.js b/index.js index 6a59bbb..85e900c 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,13 @@ try { } catch (ex) { // Can't determine version } -var configJSONS = JSON.parse(fs.readFileSync(__dirname + "/../../../config.json")); // Read configuration JSON +var configJSONS = {}; +try { + configJSONS = JSON.parse(fs.readFileSync(__dirname + "/../../../config.json")); // Read configuration JSON +} catch(ex) { + //RedBrick will not care about configJSONS in SVR.JS 3.x and newer + //SVR.JS 2.x and older will fail to start with broken configuration file anyway... +} var exttointerpreteruser = {}; var scriptExts = []; diff --git a/mod.info b/mod.info index be70364..9c04500 100755 --- a/mod.info +++ b/mod.info @@ -1,4 +1,4 @@ { - "name": "DorianTech RedBrick CGI engine for SVR.JS", + "name": "RedBrick CGI engine for SVR.JS", "version": "Nightly-GitMain" }