lib/config: Update size constraints and URL (ref #3086)
This commit is contained in:
+12
-1
@@ -24,7 +24,7 @@ import (
|
||||
|
||||
const (
|
||||
OldestHandledVersion = 10
|
||||
CurrentVersion = 12
|
||||
CurrentVersion = 13
|
||||
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
||||
)
|
||||
|
||||
@@ -185,6 +185,9 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
||||
if cfg.Version == 11 {
|
||||
convertV11V12(cfg)
|
||||
}
|
||||
if cfg.Version == 12 {
|
||||
convertV12V13(cfg)
|
||||
}
|
||||
|
||||
// Build a list of available devices
|
||||
existingDevices := make(map[protocol.DeviceID]bool)
|
||||
@@ -234,6 +237,14 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
||||
}
|
||||
}
|
||||
|
||||
func convertV12V13(cfg *Configuration) {
|
||||
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) {
|
||||
// Change listen address schema
|
||||
for i, addr := range cfg.Options.ListenAddress {
|
||||
|
||||
Reference in New Issue
Block a user