1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixed portable app issue with resource paths

This commit is contained in:
Laurent Cozic 2020-05-25 00:30:29 +01:00
parent d02513bb70
commit b126c761cd

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) {