lib/config: Disable cacheIgnoredFiles, new default is disabled

This commit is contained in:
Jakob Borg
2016-04-03 21:18:16 +02:00
committed by Audrius Butkevicius
parent 7b4e1e9055
commit a4f0b85462
5 changed files with 31 additions and 7 deletions

View File

@@ -21,7 +21,7 @@ import (
const (
OldestHandledVersion = 10
CurrentVersion = 12
CurrentVersion = 13
MaxRescanIntervalS = 365 * 24 * 60 * 60
)
@@ -182,6 +182,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)
@@ -235,6 +238,13 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
}
}
func convertV12V13(cfg *Configuration) {
// Not using the ignore cache is the new default. Disable it on existing
// configurations.
cfg.Options.CacheIgnoredFiles = false
cfg.Version = 13
}
func convertV11V12(cfg *Configuration) {
// Change listen address schema
for i, addr := range cfg.Options.ListenAddress {