* updater: cut 'v' prefix when comparing SelfUpdateMinVersion

This commit is contained in:
Simon Zolin 2020-07-23 12:17:20 +03:00
parent ccf5494f67
commit 4f4a688ee6
1 changed files with 2 additions and 1 deletions

View File

@ -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
}