diff --git a/ImageSort.WindowsUpdater/GitHubUpdateFetcher.cs b/ImageSort.WindowsUpdater/GitHubUpdateFetcher.cs index 408b93ba..5bf572b7 100644 --- a/ImageSort.WindowsUpdater/GitHubUpdateFetcher.cs +++ b/ImageSort.WindowsUpdater/GitHubUpdateFetcher.cs @@ -2,6 +2,7 @@ using Semver; using System; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; @@ -42,6 +43,8 @@ public GitHubUpdateFetcher(GitHubClient client) var releaseVersion = SemVersion.Parse(release.TagName.Substring(firstIndexOfV + 1)); + if (int.TryParse(releaseVersion.Build, out int build)) releaseVersion = releaseVersion.Change(build: (build - 1).ToString(CultureInfo.InvariantCulture.NumberFormat)); + var isNewVersion = version.CompareTo(releaseVersion) < 0; return prereleaseCondition && isNewVersion;