Skip to content

Commit

Permalink
fix(windows): start fix in some cases (possible win7 fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Feb 12, 2018
1 parent 80fd8eb commit 45c408f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/background/electronAppPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export default (app) => {
return `./${app}.exe`
}

if(/^win/.test(process.platform) && fs.existsSync(path.dirname(process.execPath) + `/${app}.exe`)) {
return path.dirname(process.execPath) + `/${app}.exe`
}

if (fs.existsSync(fs.realpathSync(__dirname) + `/${app}`)) {
return fs.realpathSync(__dirname) + `/${app}`
}
Expand Down

0 comments on commit 45c408f

Please sign in to comment.