Refactor cache swapping logic

* Hoist everything into a function
* Add error handling
* Rename vars for clarity
* Skip renaming if the current and new version are the same: this along with the error handling should fix the black screen when using multiple clients
This commit is contained in:
CakeLancelot
2023-02-08 14:06:54 -06:00
parent 51f7eaf33d
commit c1db7bc047
2 changed files with 53 additions and 30 deletions

View File

@@ -110,8 +110,8 @@ app.on("ready", function () {
showMainWindow();
}
}
} catch (e) {
console.log("An error occurred while checking for the config.");
} catch (ex) {
console.log("An error occurred while checking for the config");
}
// Makes it so external links are opened in the system browser, not Electron