mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-16 18:09:47 +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"
|
"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…
Add table
Reference in a new issue