From 4f4a688ee616af492d4c4930abb7a62395cec8bb Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 23 Jul 2020 12:17:20 +0300 Subject: [PATCH] * updater: cut 'v' prefix when comparing SelfUpdateMinVersion --- update/check.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update/check.go b/update/check.go index 09755d65..fc6f1203 100644 --- a/update/check.go +++ b/update/check.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "io/ioutil" + "strings" "time" ) @@ -66,7 +67,7 @@ func (u *Updater) parseVersionResponse(data []byte) (VersionInfo, error) { if ok && info.NewVersion != u.VersionString && - u.VersionString >= info.SelfUpdateMinVersion { + strings.TrimPrefix(u.VersionString, "v") >= strings.TrimPrefix(info.SelfUpdateMinVersion, "v") { info.CanAutoUpdate = true }