Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
Corrects an error when checking for an update to the latest version.
This error causes the detection of an update that does not exist. (issue #70)
Also fixes incorrect version number detection (build version number was truncated)
  • Loading branch information
gawindx committed Feb 21, 2021
1 parent 82e2310 commit f0975a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WinNUT_V2/WinNUT_GUI/Update_Gui.vb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Public Class Update_Gui
Dim JSONReleases = Newtonsoft.Json.JsonConvert.DeserializeObject(e.Result)
Dim HighestVersion As String = Nothing
Dim ActualVersion As Version = Version.Parse(WinNUT_Globals.ProgramVersion)
Dim sPattern As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex("[Vv](\d+\.\d+\.\d+\.?\d+?).*$")
Dim sPattern As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex("[Vv](\d+\.\d+\.\d+\.?\d+).*$")
For Each JSONRelease In JSONReleases
Dim PreRelease = Convert.ToBoolean(JSONRelease("prerelease").ToString)
Dim DraftRelease = Convert.ToBoolean(JSONRelease("draft").ToString)
Expand All @@ -119,7 +119,7 @@ Public Class Update_Gui
ChangeLogDiff &= vbNewLine & ReleaseName & vbNewLine & JSONRelease("body").ToString & vbNewLine
End If
Next
If ChangeLogDiff IsNot Nothing Then
If ChangeLogDiff IsNot Nothing And Me.NewVersionMsiURL IsNot Nothing Then
Me.sChangeLog = ChangeLogDiff
Me.HasUpdate = True
LogFile.LogTracing(String.Format("New Version Available : {0}", Me.NewVersion), LogLvl.LOG_DEBUG, Me, String.Format(WinNUT_Globals.StrLog.Item(AppResxStr.STR_LOG_UPDATE), Me.NewVersion))
Expand Down

0 comments on commit f0975a3

Please sign in to comment.