aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.js3
-rw-r--r--src/index.js8
2 files changed, 7 insertions, 4 deletions
diff --git a/src/config.js b/src/config.js
index 761d26eea..ad4fc6165 100644
--- a/src/config.js
+++ b/src/config.js
@@ -113,7 +113,8 @@ export const FILE_SYSTEM_SETTINGS_TYPES = [
113 113
114export const LOCAL_SERVER = 'You are using Ferdi without a server'; 114export const LOCAL_SERVER = 'You are using Ferdi without a server';
115 115
116export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); 116// export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config');
117export const SETTINGS_PATH = path.join(app.getPath('appData'), 'config');
117 118
118// Replacing app.asar is not beautiful but unforunately necessary 119// Replacing app.asar is not beautiful but unforunately necessary
119export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); 120export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes'));
diff --git a/src/index.js b/src/index.js
index 87aa6357b..edcea2049 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,9 +9,11 @@ import fs from 'fs-extra';
9import path from 'path'; 9import path from 'path';
10import windowStateKeeper from 'electron-window-state'; 10import windowStateKeeper from 'electron-window-state';
11 11
12if (process.platform === 'win32') { 12// Set app directory before loading user modules
13 app.setPath('appData', process.env.LOCALAPPDATA); 13if (process.env.FERDI_APPDATA_DIR != null) {
14 app.setPath('userData', path.join(process.env.LOCALAPPDATA, app.getName())); 14 app.setPath('appData', process.env.FERDI_APPDATA_DIR);
15} else if (process.env.PORTABLE_EXECUTABLE_DIR != null) {
16 app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}-appdata`);
15} 17}
16 18
17if (isDevMode) { 19if (isDevMode) {