From 464da346d1c882f465abc1d00145c57a13533247 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Mon, 12 Feb 2018 10:08:50 +0300 Subject: [PATCH] fix(windows): start fix in some cases (possible win7 fix) --- src/background/electronAppPath.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/background/electronAppPath.js b/src/background/electronAppPath.js index 79ce5fc..8fb307d 100644 --- a/src/background/electronAppPath.js +++ b/src/background/electronAppPath.js @@ -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}` }