Desktop: Fixed portable app issue with resource paths

pull/3271/head
Laurent Cozic 2020-05-25 00:30:29 +01:00
parent d02513bb70
commit b126c761cd
1 changed files with 9 additions and 3 deletions

View File

@ -582,11 +582,17 @@ class BaseApplication {
}
determineProfileDir(initArgs) {
if (initArgs.profileDir) return initArgs.profileDir;
let output = '';
if (process && process.env && process.env.PORTABLE_EXECUTABLE_DIR) return `${process.env.PORTABLE_EXECUTABLE_DIR}/JoplinProfile`;
if (initArgs.profileDir) {
output = initArgs.profileDir;
} else if (process && process.env && process.env.PORTABLE_EXECUTABLE_DIR) {
output = `${process.env.PORTABLE_EXECUTABLE_DIR}/JoplinProfile`;
} else {
output = `${os.homedir()}/.config/${Setting.value('appName')}`;
}
return toSystemSlashes(`${os.homedir()}/.config/${Setting.value('appName')}`, 'linux');
return toSystemSlashes(output, 'linux');
}
async start(argv) {