Skip to content

Commit

Permalink
lib/model: Don't use rescan interval less than user defaults on auto …
Browse files Browse the repository at this point in the history
…accepted encrypted folder (fixes #8572)
  • Loading branch information
Ratio2 committed Oct 3, 2022
1 parent 29e79f0 commit f4fe85d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1682,8 +1682,11 @@ 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
if fcfg.RescanIntervalS == 60 || fcfg.RescanIntervalS == 3600 {
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
Expand Down

0 comments on commit f4fe85d

Please sign in to comment.