Generate LocalIndexUpdated events in Override

The override should look like we detected the changes locally, or the
GUI and other things won't update correctly.

This is/was caught by the Override integration test, on my newly
refactored integration test suite which is soon ready for prime time, so
a test is coming. :)
This commit is contained in:
Jakob Borg 2015-06-18 10:37:50 +02:00
parent 4beb42bf45
commit 7af1863e81

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)
} }