Fix Fresh installs (no .config/armcord) will crash #621 (#622)

This commit is contained in:
Aiden 2024-06-15 13:28:28 -04:00 committed by GitHub
parent cfc4b09d4f
commit 4d545ed684
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,11 @@ export function checkIfConfigExists(): void {
const storagePath = path.join(userDataPath, "/storage/");
const settingsFile = `${storagePath}settings.json`;
if (!fs.existsSync(app.getPath("userData"))) {
fs.mkdirSync(app.getPath("userData"));
console.log("Created missing user data folder");
}
if (!fs.existsSync(settingsFile)) {
if (!fs.existsSync(storagePath)) {
fs.mkdirSync(storagePath);