From 7af1863e817fa6a9533675074be05759f3a6a32b Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Thu, 18 Jun 2015 10:37:50 +0200 Subject: [PATCH] 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. :) --- internal/model/model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/model/model.go b/internal/model/model.go index 0b21a0203..39956f978 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -1511,7 +1511,7 @@ func (m *Model) Override(folder string) { fs.WithNeed(protocol.LocalDeviceID, func(fi db.FileIntf) bool { need := fi.(protocol.FileInfo) if len(batch) == indexBatchSize { - fs.Update(protocol.LocalDeviceID, batch) + m.updateLocals(folder, batch) batch = batch[:0] } @@ -1531,7 +1531,7 @@ func (m *Model) Override(folder string) { return true }) if len(batch) > 0 { - fs.Update(protocol.LocalDeviceID, batch) + m.updateLocals(folder, batch) } runner.setState(FolderIdle) }