lib/config: Change upgrade check URL (fixes #3086)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3089
This commit is contained in:
parent
2e9bf0b67c
commit
e8b4286c93
@ -291,8 +291,6 @@ func convertV12V13(cfg *Configuration) {
|
|||||||
}
|
}
|
||||||
cfg.Options.GlobalAnnServers = newAddrs
|
cfg.Options.GlobalAnnServers = newAddrs
|
||||||
|
|
||||||
cfg.Version = 13
|
|
||||||
|
|
||||||
for i, fcfg := range cfg.Folders {
|
for i, fcfg := range cfg.Folders {
|
||||||
if fcfg.DeprecatedReadOnly {
|
if fcfg.DeprecatedReadOnly {
|
||||||
cfg.Folders[i].Type = FolderTypeReadOnly
|
cfg.Folders[i].Type = FolderTypeReadOnly
|
||||||
@ -301,6 +299,12 @@ func convertV12V13(cfg *Configuration) {
|
|||||||
}
|
}
|
||||||
cfg.Folders[i].DeprecatedReadOnly = false
|
cfg.Folders[i].DeprecatedReadOnly = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.Options.ReleasesURL == "https://api.github.com/repos/syncthing/syncthing/releases?per_page=30" {
|
||||||
|
cfg.Options.ReleasesURL = "https://upgrades.syncthing.net/meta.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.Version = 13
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertV11V12(cfg *Configuration) {
|
func convertV11V12(cfg *Configuration) {
|
||||||
|
|||||||
@ -57,7 +57,7 @@ func TestDefaultValues(t *testing.T) {
|
|||||||
URURL: "https://data.syncthing.net/newdata",
|
URURL: "https://data.syncthing.net/newdata",
|
||||||
URInitialDelayS: 1800,
|
URInitialDelayS: 1800,
|
||||||
URPostInsecurely: false,
|
URPostInsecurely: false,
|
||||||
ReleasesURL: "https://api.github.com/repos/syncthing/syncthing/releases?per_page=30",
|
ReleasesURL: "https://upgrades.syncthing.net/meta.json",
|
||||||
AlwaysLocalNets: []string{},
|
AlwaysLocalNets: []string{},
|
||||||
OverwriteRemoteDevNames: false,
|
OverwriteRemoteDevNames: false,
|
||||||
TempIndexMinBlocks: 10,
|
TempIndexMinBlocks: 10,
|
||||||
|
|||||||
@ -35,7 +35,7 @@ type OptionsConfiguration struct {
|
|||||||
SymlinksEnabled bool `xml:"symlinksEnabled" json:"symlinksEnabled" default:"true"`
|
SymlinksEnabled bool `xml:"symlinksEnabled" json:"symlinksEnabled" default:"true"`
|
||||||
LimitBandwidthInLan bool `xml:"limitBandwidthInLan" json:"limitBandwidthInLan" default:"false"`
|
LimitBandwidthInLan bool `xml:"limitBandwidthInLan" json:"limitBandwidthInLan" default:"false"`
|
||||||
MinHomeDiskFreePct float64 `xml:"minHomeDiskFreePct" json:"minHomeDiskFreePct" default:"1"`
|
MinHomeDiskFreePct float64 `xml:"minHomeDiskFreePct" json:"minHomeDiskFreePct" default:"1"`
|
||||||
ReleasesURL string `xml:"releasesURL" json:"releasesURL" default:"https://api.github.com/repos/syncthing/syncthing/releases?per_page=30"`
|
ReleasesURL string `xml:"releasesURL" json:"releasesURL" default:"https://upgrades.syncthing.net/meta.json"`
|
||||||
AlwaysLocalNets []string `xml:"alwaysLocalNet" json:"alwaysLocalNets"`
|
AlwaysLocalNets []string `xml:"alwaysLocalNet" json:"alwaysLocalNets"`
|
||||||
OverwriteRemoteDevNames bool `xml:"overwriteRemoteDeviceNamesOnConnect" json:"overwriteRemoteDeviceNamesOnConnect" default:"false"`
|
OverwriteRemoteDevNames bool `xml:"overwriteRemoteDeviceNamesOnConnect" json:"overwriteRemoteDeviceNamesOnConnect" default:"false"`
|
||||||
TempIndexMinBlocks int `xml:"tempIndexMinBlocks" json:"tempIndexMinBlocks" default:"10"`
|
TempIndexMinBlocks int `xml:"tempIndexMinBlocks" json:"tempIndexMinBlocks" default:"10"`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user