UpdateManager: don't update if update is older than currently running version - fixes #838

This commit is contained in:
Nick Vella 2019-08-07 23:57:04 +10:00
parent de565b29c6
commit c1591d8873
1 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,15 @@ namespace OpenLiveWriter.PostEditor.Updates
{
using (var manager = new Squirrel.UpdateManager(downloadUrl))
{
var update = await manager.CheckForUpdate();
if(update.FutureReleaseEntry.Version < update.CurrentlyInstalledVersion.Version)
{
Trace.WriteLine("Update is older than currently running version, not installing.");
Trace.WriteLine($"Current: {update.CurrentlyInstalledVersion.Version} Update: {update.FutureReleaseEntry.Version}");
return;
}
await manager.UpdateApp();
}
}