all: Add invalid/ignored files to global list, announce to peers (fixes #623)

This lets us determine accurate completion status for remote peers when they
have ignored files.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4460
This commit is contained in:
Simon Frei
2017-11-11 19:18:17 +00:00
committed by Jakob Borg
parent ec4c3bae0d
commit c080f677cb
17 changed files with 446 additions and 254 deletions

View File

@@ -32,7 +32,7 @@ import (
const (
OldestHandledVersion = 10
CurrentVersion = 25
CurrentVersion = 26
MaxRescanIntervalS = 365 * 24 * 60 * 60
)
@@ -329,6 +329,9 @@ func (cfg *Configuration) clean() error {
if cfg.Version == 24 {
convertV24V25(cfg)
}
if cfg.Version == 25 {
convertV25V26(cfg)
}
// Build a list of available devices
existingDevices := make(map[protocol.DeviceID]bool)
@@ -378,6 +381,11 @@ func (cfg *Configuration) clean() error {
return nil
}
func convertV25V26(cfg *Configuration) {
// triggers database update
cfg.Version = 26
}
func convertV24V25(cfg *Configuration) {
for i := range cfg.Folders {
cfg.Folders[i].FSWatcherDelayS = 10