You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Desktop: Add support for multiple instances (#11963)
This commit is contained in:
@@ -687,7 +687,9 @@ export default class BaseApplication {
|
||||
// https://immerjs.github.io/immer/docs/freezing
|
||||
setAutoFreeze(initArgs.env === 'dev');
|
||||
|
||||
const { rootProfileDir, homeDir } = determineProfileAndBaseDir(options.rootProfileDir ?? initArgs.profileDir, appName);
|
||||
const altInstanceId = initArgs.altInstanceId || '';
|
||||
|
||||
const { rootProfileDir, homeDir } = determineProfileAndBaseDir(options.rootProfileDir ?? initArgs.profileDir, appName, altInstanceId);
|
||||
const { profileDir, profileConfig, isSubProfile } = await initProfile(rootProfileDir);
|
||||
this.profileConfig_ = profileConfig;
|
||||
|
||||
@@ -781,6 +783,8 @@ export default class BaseApplication {
|
||||
Setting.setValue('isSafeMode', true);
|
||||
}
|
||||
|
||||
Setting.setValue('altInstanceId', altInstanceId);
|
||||
|
||||
const safeModeFlagFile = join(profileDir, safeModeFlagFilename);
|
||||
if (await fs.pathExists(safeModeFlagFile) && fs.readFileSync(safeModeFlagFile, 'utf8') === 'true') {
|
||||
appLogger.info(`Safe mode enabled because of file: ${safeModeFlagFile}`);
|
||||
|
||||
Reference in New Issue
Block a user