aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Makazzz <makazzzpro@live.ca>2019-10-26 15:24:16 -0400
committerLibravatar Makazzz <makazzzpro@live.ca>2019-10-26 15:24:16 -0400
commitbc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1 (patch)
tree42d07b747b87f5f3193af3021b9fa6a1b28e852b
parentChange appData env (diff)
downloadferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.tar.gz
ferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.tar.zst
ferdium-app-bc21d533bd2c1b9f4bdfb8553b4a3f21d1b845e1.zip
Testing
-rw-r--r--src/config.js3
-rw-r--r--src/index.js8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/config.js b/src/config.js
index ad4fc6165..761d26eea 100644
--- a/src/config.js
+++ b/src/config.js
@@ -113,8 +113,7 @@ 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
116// export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config'); 116export const SETTINGS_PATH = path.join(app.getPath('userData'), 'config');
117export const SETTINGS_PATH = path.join(app.getPath('appData'), 'config');
118 117
119// Replacing app.asar is not beautiful but unforunately necessary 118// Replacing app.asar is not beautiful but unforunately necessary
120export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes')); 119export const RECIPES_PATH = asarPath(path.join(__dirname, 'recipes'));
diff --git a/src/index.js b/src/index.js
index edcea2049..fd96f8a49 100644
--- a/src/index.js
+++ b/src/index.js
@@ -10,10 +10,10 @@ import path from 'path';
10import windowStateKeeper from 'electron-window-state'; 10import windowStateKeeper from 'electron-window-state';
11 11
12// Set app directory before loading user modules 12// Set app directory before loading user modules
13if (process.env.FERDI_APPDATA_DIR != null) { 13if (process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR) {
14 app.setPath('appData', process.env.FERDI_APPDATA_DIR); 14 const appDataPath = process.env.FERDI_APPDATA_DIR || process.env.PORTABLE_EXECUTABLE_DIR
15} else if (process.env.PORTABLE_EXECUTABLE_DIR != null) { 15 app.setPath('appData', appDataPath);
16 app.setPath('appData', process.env.PORTABLE_EXECUTABLE_DIR, `${app.getName()}-appdata`); 16 app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
17} 17}
18 18
19if (isDevMode) { 19if (isDevMode) {