Seed client auth from token file and pin the data dir

This commit is contained in:
agent
2026-09-11 13:09:35 +02:00
parent 7fdc71562a
commit 2830bd1ade
6 changed files with 53 additions and 3 deletions
+6 -1
View File
@@ -18,10 +18,15 @@ export const PORTABLE =
!existsSync(join(vesktopDir, "Uninstall Vesktop.exe"));
export const DATA_DIR =
process.env.VENCORD_USER_DATA_DIR || (PORTABLE ? join(vesktopDir, "Data") : join(app.getPath("userData")));
process.env.VENCORD_USER_DATA_DIR ||
process.env.VESKSLOP_DATA_DIR ||
(PORTABLE ? join(vesktopDir, "Data") : join(app.getPath("appData"), "veskslop"));
mkdirSync(DATA_DIR, { recursive: true });
/** Durable auth credential. Seeded into the client before it boots. */
export const TOKEN_FILE = process.env.VESKSLOP_TOKEN_FILE || join(DATA_DIR, "token");
export const SESSION_DATA_DIR = join(DATA_DIR, "sessionData");
app.setPath("sessionData", SESSION_DATA_DIR);