aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorLumiChnn <89748230+LumiChnn@users.noreply.github.com>2023-04-01 15:19:02 +0100
committerGitHub <noreply@github.com>2023-04-01 15:19:02 +0100
commita62d0ac7a88c86ff8a21ed0fe35b05a26bbdec05 (patch)
tree17771ba816c0d7cbe16398ee7558e7ef7bb0c82a /src/app
parent92fb59d2c4343b6bf96713e5586dad38a6fa90b2 (diff)
downloadViper-a62d0ac7a88c86ff8a21ed0fe35b05a26bbdec05.tar.gz
Viper-a62d0ac7a88c86ff8a21ed0fe35b05a26bbdec05.zip
Fixes broken JSON files on restart
On restart, if the json file was broken supposedly would try to repair but it wouldn't work, it would keep repairing but failing. This should fix it by deleting the json file and creating a new one at the start with the correct settings (hopefully)
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 7382a37..73537a2 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -39,7 +39,7 @@ if (fs.existsSync("viper.json")) {
if (! reset) {
ipcRenderer.send("exit");
} else {
- fs.writeFileSync("viper.json", "{}");
+ fs.rmSync("viper.json");
ipcRenderer.send("relaunch");
}