From adcfe6a3df6ad00f2151a48ac714bf34c41ec654 Mon Sep 17 00:00:00 2001 From: Antelle Date: Sat, 14 Nov 2015 10:56:45 +0300 Subject: [PATCH] fix entry point versioning --- electron/launcher.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/electron/launcher.js b/electron/launcher.js index e08dd5dd..84015d2d 100644 --- a/electron/launcher.js +++ b/electron/launcher.js @@ -1,3 +1,11 @@ +// KeeWeb launcher script + +// This script is distributed with the app and is its entry point +// It checks whether the app is available in userData folder and if its version is higher than local, launches it +// This script is the only part which will be updated only with the app itself, auto-update will not change it + +// (C) Antelle 2015, MIT license https://github.com/antelle/keeweb + 'use strict'; /* jshint node:true */ @@ -20,6 +28,10 @@ if (fs.existsSync(appPathUserData)) { for (var i = 0; i < versionLocal.length; i++) { if (+versionUserData[i] > +versionLocal[i]) { appPath = appPathUserData; + break; + } + if (+versionUserData[i] < +versionLocal[i]) { + break; } } }