lib/model: Don't lower rescan interval from default on auto accepted enc folder (fixes #8572) (#8573)

This commit is contained in:
Aleksey Vasenev 2022-12-22 02:52:22 +08:00 committed by GitHub
parent f0126fe1ab
commit f9d68474ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1684,7 +1684,12 @@ func (m *model) handleAutoAccepts(deviceID protocol.DeviceID, folder protocol.Fo
fcfg.Type = config.FolderTypeReceiveEncrypted
// Override the user-configured defaults, as normally done by the GUI
fcfg.FSWatcherEnabled = false
fcfg.RescanIntervalS = 3600 * 24
if fcfg.RescanIntervalS != 0 {
minRescanInterval := 3600 * 24
if fcfg.RescanIntervalS < minRescanInterval {
fcfg.RescanIntervalS = minRescanInterval
}
}
fcfg.Versioning.Reset()
// Other necessary settings are ensured by FolderConfiguration itself
} else {