File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ createApiServer()
1414subscribeToChannels ( )
1515
1616function createWindow ( ) {
17+ if ( isDev ) {
18+ store . preferences . set ( 'storagePath' , os . homedir ( ) + '/massCode/dev' )
19+ store . preferences . set ( 'backupPath' , os . homedir ( ) + '/massCode/dev' )
20+ }
21+
1722 const bounds = store . app . get ( 'bounds' )
1823 const mainWindow = new BrowserWindow ( {
1924 width : 1000 ,
Original file line number Diff line number Diff line change 11import Store from 'electron-store'
2- import { STORE_NAME } from '..'
32import type { AppStore } from './types'
43
54export default new Store < AppStore > ( {
Original file line number Diff line number Diff line change 11import Store from 'electron-store'
22import { homedir , platform } from 'os'
3- import { STORE_NAME } from '..'
43import type { PreferencesStore } from './types'
54
6- const isDev = process . env . NODE_ENV === 'development'
75const isWin = platform ( ) === 'win32'
86
9- const prodPath = isWin ? homedir ( ) + '\\massCode' : homedir ( ) + '/massCode'
10- const devPath = isWin
11- ? homedir ( ) + '\\massCode\\dev'
12- : homedir ( ) + '/massCode/dev'
13-
14- const defaultPath = isDev ? devPath : prodPath
7+ const defaultPath = isWin ? homedir ( ) + '\\massCode' : homedir ( ) + '/massCode'
158const backupPath = isWin ? `${ defaultPath } \\backups` : `${ defaultPath } /backups`
169
1710export default new Store < PreferencesStore > ( {
You can’t perform that action at this time.
0 commit comments