aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/index.ts')
-rw-r--r--packages/main/src/index.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts
index 41424ab..ff14332 100644
--- a/packages/main/src/index.ts
+++ b/packages/main/src/index.ts
@@ -24,8 +24,7 @@ import {
24 BrowserWindow, 24 BrowserWindow,
25 ipcMain, 25 ipcMain,
26} from 'electron'; 26} from 'electron';
27import { readFileSync } from 'fs'; 27import { ensureDirSync, readFile, readFileSync } from 'fs-extra';
28import { readFile } from 'fs/promises';
29import { autorun } from 'mobx'; 28import { autorun } from 'mobx';
30import { getSnapshot, onPatch } from 'mobx-state-tree'; 29import { getSnapshot, onPatch } from 'mobx-state-tree';
31import { join } from 'path'; 30import { join } from 'path';
@@ -55,7 +54,9 @@ app.enableSandbox();
55 54
56// Use alternative directory when debugging to avoid clobbering the main installation. 55// Use alternative directory when debugging to avoid clobbering the main installation.
57if (isDevelopment) { 56if (isDevelopment) {
58 app.setPath('userData', `${app.getPath('userData')}-dev`); 57 const devUserDataPath = `${app.getPath('userData')}-dev`;
58 app.setPath('userData', devUserDataPath);
59 ensureDirSync(devUserDataPath);
59} 60}
60 61
61// Only allow a single instance at a time. 62// Only allow a single instance at a time.