all: Add filesystem notification support

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3986
This commit is contained in:
Michael Ploujnikov
2017-10-20 14:52:55 +00:00
committed by Audrius Butkevicius
parent c704ba9ef9
commit f98c21b68e
62 changed files with 6079 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ import (
const (
OldestHandledVersion = 10
CurrentVersion = 24
CurrentVersion = 25
MaxRescanIntervalS = 365 * 24 * 60 * 60
)
@@ -326,6 +326,9 @@ func (cfg *Configuration) clean() error {
if cfg.Version == 23 {
convertV23V24(cfg)
}
if cfg.Version == 24 {
convertV24V25(cfg)
}
// Build a list of available devices
existingDevices := make(map[protocol.DeviceID]bool)
@@ -375,6 +378,14 @@ func (cfg *Configuration) clean() error {
return nil
}
func convertV24V25(cfg *Configuration) {
for i := range cfg.Folders {
cfg.Folders[i].FSWatcherDelayS = 10
}
cfg.Version = 25
}
func convertV23V24(cfg *Configuration) {
cfg.Options.URSeen = 2