mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
set custom userData path for dev
This commit is contained in:
+8
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user