fix: move config to AppData to prevent settings loss on update, add config.dev.json for dev environment

This commit is contained in:
MasterAcnolo
2026-04-11 16:33:58 +02:00
parent 96401a6e1f
commit 9b4b0306c7
5 changed files with 36 additions and 23 deletions

View File

@@ -1,18 +1,10 @@
const { ipcMain, dialog, shell } = require("electron");
const fs = require("fs");
const path = require("path");
const { logger, logDir } = require("../server/logger");
const { configFeatures } = require("../config");
const { configFeatures, featuresPath } = require("../config");
const config = require("../config");
const { validateDownloadPath, getDefaultDownloadPath } = require("./pathValidator");
const configFolderPath = path.join(
config.localMode
? path.join(__dirname, "..")
: path.join(path.dirname(process.execPath), "resources"), "config", "config.json"
);
const FEATURE_WHITELIST = new Set([
"autoUpdate",
"discordRPC",
@@ -25,6 +17,8 @@ const FEATURE_WHITELIST = new Set([
"customCodec",
]);
const configFolderPath = featuresPath;
function registerIpcHandlers(getMainWindow) {
// Infos générales