1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed auto-update check

This commit is contained in:
Laurent Cozic 2018-01-31 19:34:38 +00:00
parent fcf8a1649d
commit 2b627fe4ab
2 changed files with 7 additions and 4 deletions

View File

@ -43,13 +43,16 @@ class Application extends BaseApplication {
constructor() { constructor() {
super(); super();
this.lastMenuScreen_ = null; this.lastMenuScreen_ = null;
this.checkForUpdateLoggerPath_ = Setting.value('profileDir') + '/log-autoupdater.txt';
} }
hasGui() { hasGui() {
return true; return true;
} }
checkForUpdateLoggerPath() {
return Setting.value('profileDir') + '/log-autoupdater.txt';
}
reducer(state = appDefaultState, action) { reducer(state = appDefaultState, action) {
let newState = state; let newState = state;
@ -298,7 +301,7 @@ class Application extends BaseApplication {
}, { }, {
label: _('Check for updates...'), label: _('Check for updates...'),
click: () => { click: () => {
bridge().checkForUpdates(false, this.checkForUpdateLoggerPath_); bridge().checkForUpdates(false, this.checkForUpdateLoggerPath());
} }
}, { }, {
label: _('About Joplin'), label: _('About Joplin'),
@ -391,9 +394,9 @@ class Application extends BaseApplication {
// Note: Auto-update currently doesn't work in Linux: it downloads the update // Note: Auto-update currently doesn't work in Linux: it downloads the update
// but then doesn't install it on exit. // but then doesn't install it on exit.
if (shim.isWindows() || shim.isMac()) { if (shim.isWindows() || shim.isMac()) {
const runAutoUpdateCheck = function() { const runAutoUpdateCheck = () => {
if (Setting.value('autoUpdateEnabled')) { if (Setting.value('autoUpdateEnabled')) {
bridge().checkForUpdates(true, this.checkForUpdateLoggerPath_); bridge().checkForUpdates(true, this.checkForUpdateLoggerPath());
} }
} }