diff options
Diffstat (limited to 'packages/main/src')
-rw-r--r-- | packages/main/src/index.ts | 7 |
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'; |
27 | import { readFileSync } from 'fs'; | 27 | import { ensureDirSync, readFile, readFileSync } from 'fs-extra'; |
28 | import { readFile } from 'fs/promises'; | ||
29 | import { autorun } from 'mobx'; | 28 | import { autorun } from 'mobx'; |
30 | import { getSnapshot, onPatch } from 'mobx-state-tree'; | 29 | import { getSnapshot, onPatch } from 'mobx-state-tree'; |
31 | import { join } from 'path'; | 30 | import { 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. |
57 | if (isDevelopment) { | 56 | if (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. |