use process.execPath

This commit is contained in:
MrGarlic1 2024-05-09 17:07:03 +01:00 committed by GitHub
parent b445a5360c
commit 1abb25c204
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,9 +6,9 @@
import { app } from "electron";
import { existsSync, readdirSync, renameSync, rmdirSync } from "fs";
import { join, resolve } from "path";
import { dirname, join } from "path";
const vesktopDir = resolve(__dirname, "..", "..", "..", "..");
const vesktopDir = dirname(process.execPath);
export const PORTABLE = process.platform === "win32" && !readdirSync(vesktopDir).includes("Uninstall Vesktop.exe");
const LEGACY_DATA_DIR = join(app.getPath("appData"), "VencordDesktop", "VencordDesktop");