Skip to content

Commit a0799d1

Browse files
AWolf81Rokt33r
authored andcommitted
fix app path
1 parent ba6eb4f commit a0799d1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

browser/lib/consts.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ const CODEMIRROR_THEME_PATH = 'node_modules/codemirror/theme'
77
const CODEMIRROR_EXTRA_THEME_PATH = 'extra_scripts/codemirror/theme'
88

99
const isProduction = process.env.NODE_ENV === 'production'
10-
const exePath = path.dirname(app.getPath('exe'))
11-
const appPath = path.join(exePath, 'resources', 'app')
1210

1311
const paths = [
14-
isProduction ? path.join(appPath, CODEMIRROR_THEME_PATH) : path.resolve(CODEMIRROR_THEME_PATH),
15-
isProduction ? path.join(appPath, CODEMIRROR_EXTRA_THEME_PATH) : path.resolve(CODEMIRROR_EXTRA_THEME_PATH)
12+
isProduction ? path.join(app.getAppPath(), CODEMIRROR_THEME_PATH) : path.resolve(CODEMIRROR_THEME_PATH),
13+
isProduction ? path.join(app.getAppPath(), CODEMIRROR_EXTRA_THEME_PATH) : path.resolve(CODEMIRROR_EXTRA_THEME_PATH)
1614
]
1715

1816
const themes = paths

0 commit comments

Comments
 (0)