lib/model: Fix indexhandling for new folders paused on remote (#7747)

This commit is contained in:
Simon Frei 2021-06-05 16:27:15 +02:00 committed by GitHub
parent 1e212a8dc6
commit b1e0e7b923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1306,7 +1306,9 @@ func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.Devi
if err := m.db.AddOrUpdatePendingFolder(folder.ID, of, deviceID); err != nil { if err := m.db.AddOrUpdatePendingFolder(folder.ID, of, deviceID); err != nil {
l.Warnf("Failed to persist pending folder entry to database: %v", err) l.Warnf("Failed to persist pending folder entry to database: %v", err)
} }
indexHandlers.AddIndexInfo(folder.ID, ccDeviceInfos[folder.ID]) if !folder.Paused {
indexHandlers.AddIndexInfo(folder.ID, ccDeviceInfos[folder.ID])
}
updatedPending = append(updatedPending, updatedPendingFolder{ updatedPending = append(updatedPending, updatedPendingFolder{
FolderID: folder.ID, FolderID: folder.ID,
FolderLabel: folder.Label, FolderLabel: folder.Label,