Revert "lib/model: Emit LocalDiskUpdated events on detecting local changes"

This reverts commit 5a7fad0bcd.
This commit is contained in:
Jakob Borg
2016-05-14 10:55:24 +02:00
parent 5a7fad0bcd
commit 6f743f3138
7 changed files with 15 additions and 85 deletions

View File

@@ -62,7 +62,7 @@ func setUpModel(file protocol.FileInfo) *Model {
model := NewModel(defaultConfig, protocol.LocalDeviceID, "device", "syncthing", "dev", db, nil)
model.AddFolder(defaultFolderConfig)
// Update index
model.updateLocalsFromPulling("default", []protocol.FileInfo{file})
model.updateLocals("default", []protocol.FileInfo{file})
return model
}
@@ -255,7 +255,7 @@ func TestCopierCleanup(t *testing.T) {
file.Blocks = []protocol.BlockInfo{blocks[1]}
file.Version = file.Version.Update(protocol.LocalDeviceID.Short())
// Update index (removing old blocks)
m.updateLocalsFromPulling("default", []protocol.FileInfo{file})
m.updateLocals("default", []protocol.FileInfo{file})
if m.finder.Iterate(folders, blocks[0].Hash, iterFn) {
t.Error("Unexpected block found")
@@ -268,7 +268,7 @@ func TestCopierCleanup(t *testing.T) {
file.Blocks = []protocol.BlockInfo{blocks[0]}
file.Version = file.Version.Update(protocol.LocalDeviceID.Short())
// Update index (removing old blocks)
m.updateLocalsFromPulling("default", []protocol.FileInfo{file})
m.updateLocals("default", []protocol.FileInfo{file})
if !m.finder.Iterate(folders, blocks[0].Hash, iterFn) {
t.Error("Unexpected block found")