all: Transition to using fs watcher by default (fixes #4552)
This commit is contained in:
committed by
Audrius Butkevicius
parent
d6bb8e6e06
commit
a557d62c4a
@@ -32,7 +32,7 @@ import (
|
||||
|
||||
const (
|
||||
OldestHandledVersion = 10
|
||||
CurrentVersion = 27
|
||||
CurrentVersion = 28
|
||||
MaxRescanIntervalS = 365 * 24 * 60 * 60
|
||||
)
|
||||
|
||||
@@ -315,6 +315,9 @@ func (cfg *Configuration) clean() error {
|
||||
if cfg.Version == 26 {
|
||||
convertV26V27(cfg)
|
||||
}
|
||||
if cfg.Version == 27 {
|
||||
convertV27V28(cfg)
|
||||
}
|
||||
|
||||
// Build a list of available devices
|
||||
existingDevices := make(map[protocol.DeviceID]bool)
|
||||
@@ -374,6 +377,12 @@ func (cfg *Configuration) clean() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func convertV27V28(cfg *Configuration) {
|
||||
// Show a notification about enabling filesystem watching
|
||||
cfg.Options.UnackedNotificationIDs = append(cfg.Options.UnackedNotificationIDs, "fsWatcherNotification")
|
||||
cfg.Version = 28
|
||||
}
|
||||
|
||||
func convertV26V27(cfg *Configuration) {
|
||||
for i := range cfg.Folders {
|
||||
f := &cfg.Folders[i]
|
||||
|
||||
Reference in New Issue
Block a user