mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 04:55:33 +03:00
* updater: cut 'v' prefix when comparing SelfUpdateMinVersion
This commit is contained in:
parent
ccf5494f67
commit
4f4a688ee6
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue