Browse Source

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. :)
Jakob Borg 10 years ago
parent
commit
7af1863e81
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/model/model.go

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