set custom userData path for dev

This commit is contained in:
jeffvli 2025-05-24 18:12:29 -07:00
parent 6463ea937b
commit 90afa11f20

View file

@ -100,6 +100,13 @@ const installExtensions = async () => {
});
};
const userDataPath = app.getPath('userData');
if (isDevelopment) {
const devUserDataPath = `${userDataPath}-dev`;
app.setPath('userData', devUserDataPath);
}
const RESOURCES_PATH = app.isPackaged
? path.join(process.resourcesPath, 'assets')
: path.join(__dirname, '../../assets');
@ -624,7 +631,7 @@ const FONT_HEADERS = [
'font/woff2',
];
const singleInstance = app.requestSingleInstanceLock();
const singleInstance = isDevelopment ? true : app.requestSingleInstanceLock();
if (!singleInstance) {
app.quit();