From 05ce37fdf006819835d6751f6c6aedaff3d6beb3 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Mon, 23 Oct 2017 16:35:44 +0200 Subject: Add missing windows commit --- src/stores/AppStore.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 28fe14049..357ae7aed 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -16,10 +16,6 @@ import Miner from '../lib/Miner'; const { app, getCurrentWindow, powerMonitor } = remote; const defaultLocale = 'en-US'; -const appFolder = path.dirname(process.execPath); -const updateExe = path.resolve(appFolder, '..', 'Update.exe'); -const exeName = path.basename(process.execPath); - export default class AppStore extends Store { updateStatusTypes = { CHECKING: 'CHECKING', @@ -181,9 +177,9 @@ export default class AppStore extends Store { if (process.platform === 'win32') { settings = Object.assign({ openAsHidden: openInBackground, - path: updateExe, + path: app.getPath('exe'), args: [ - '--processStart', `"${exeName}"`, + '--processStart', `"${path.basename(app.getPath('exe'))}"`, ], }, settings); @@ -316,7 +312,7 @@ export default class AppStore extends Store { _checkAutoStart() { const loginItem = app.getLoginItemSettings({ - path: updateExe, + path: app.getPath('exe'), }); this.autoLaunchOnStart = loginItem.openAtLogin; -- cgit v1.2.3-70-g09d2