fix some ENOENT errors on first launch
This commit is contained in:
@@ -26,6 +26,7 @@ export const SESSION_DATA_DIR = join(DATA_DIR, "sessionData");
|
|||||||
app.setPath("sessionData", SESSION_DATA_DIR);
|
app.setPath("sessionData", SESSION_DATA_DIR);
|
||||||
|
|
||||||
export const VENCORD_SETTINGS_DIR = join(DATA_DIR, "settings");
|
export const VENCORD_SETTINGS_DIR = join(DATA_DIR, "settings");
|
||||||
|
mkdirSync(VENCORD_SETTINGS_DIR, { recursive: true });
|
||||||
export const VENCORD_QUICKCSS_FILE = join(VENCORD_SETTINGS_DIR, "quickCss.css");
|
export const VENCORD_QUICKCSS_FILE = join(VENCORD_SETTINGS_DIR, "quickCss.css");
|
||||||
export const VENCORD_SETTINGS_FILE = join(VENCORD_SETTINGS_DIR, "settings.json");
|
export const VENCORD_SETTINGS_FILE = join(VENCORD_SETTINGS_DIR, "settings.json");
|
||||||
export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
|
export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
|
||||||
|
|||||||
@@ -63,7 +63,12 @@ export function createFirstLaunchTour() {
|
|||||||
copyFileSync(join(from, file), join(to, file));
|
copyFileSync(join(from, file), join(to, file));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Failed to import settings:", e);
|
if (e instanceof Error && "code" in e && e.code === "ENOENT") {
|
||||||
|
console.log("No Vencord settings found to import.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error("Failed to import Vencord settings:", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user