* updater: cut 'v' prefix when comparing SelfUpdateMinVersion
This commit is contained in:
parent
ccf5494f67
commit
4f4a688ee6
@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ func (u *Updater) parseVersionResponse(data []byte) (VersionInfo, error) {
|
|||||||
|
|
||||||
if ok &&
|
if ok &&
|
||||||
info.NewVersion != u.VersionString &&
|
info.NewVersion != u.VersionString &&
|
||||||
u.VersionString >= info.SelfUpdateMinVersion {
|
strings.TrimPrefix(u.VersionString, "v") >= strings.TrimPrefix(info.SelfUpdateMinVersion, "v") {
|
||||||
info.CanAutoUpdate = true
|
info.CanAutoUpdate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user