From a62d0ac7a88c86ff8a21ed0fe35b05a26bbdec05 Mon Sep 17 00:00:00 2001 From: LumiChnn <89748230+LumiChnn@users.noreply.github.com> Date: Sat, 1 Apr 2023 15:19:02 +0100 Subject: 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) --- src/app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/app/main.js') 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"); } -- cgit v1.2.3