better check

This commit is contained in:
vee 2024-05-28 18:18:56 +02:00 committed by GitHub
parent a6cd1b1797
commit 6bc278ec71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ const vesktopDir = dirname(process.execPath);
export const PORTABLE =
process.platform === "win32" &&
!process.execPath.toLowerCase().endsWith("electron.exe") &&
!readdirSync(vesktopDir).includes("Uninstall Vesktop.exe");
!existsSync(join(vesktopDir, "Uninstall Vesktop.exe"));
const LEGACY_DATA_DIR = join(app.getPath("appData"), "VencordDesktop", "VencordDesktop");
export const DATA_DIR = PORTABLE