Merge pull request #1966 from calmh/overrideevents

Generate LocalIndexUpdated events in Override
This commit is contained in:
Audrius Butkevicius 2015-06-18 10:17:38 +01:00
commit 7219aaeb89

View File

@ -1511,7 +1511,7 @@ func (m *Model) Override(folder string) {
fs.WithNeed(protocol.LocalDeviceID, func(fi db.FileIntf) bool { fs.WithNeed(protocol.LocalDeviceID, func(fi db.FileIntf) bool {
need := fi.(protocol.FileInfo) need := fi.(protocol.FileInfo)
if len(batch) == indexBatchSize { if len(batch) == indexBatchSize {
fs.Update(protocol.LocalDeviceID, batch) m.updateLocals(folder, batch)
batch = batch[:0] batch = batch[:0]
} }
@ -1531,7 +1531,7 @@ func (m *Model) Override(folder string) {
return true return true
}) })
if len(batch) > 0 { if len(batch) > 0 {
fs.Update(protocol.LocalDeviceID, batch) m.updateLocals(folder, batch)
} }
runner.setState(FolderIdle) runner.setState(FolderIdle)
} }