Refactor state tracking (...)

Move state tracking into the puller/scanner objects. This is a first
step towards resolving #1391.

Rename Puller and Scanner to roFolder and rwFolder as they have more
duties than just pulling and scanning, and don't need to be exported.
This commit is contained in:
Jakob Borg
2015-03-16 21:14:19 +01:00
parent 124b189cc0
commit bdbca75dfa
9 changed files with 276 additions and 158 deletions

View File

@@ -90,6 +90,7 @@ func TestRequest(t *testing.T) {
// device1 shares default, but device2 doesn't
m.AddFolder(defaultFolderConfig)
m.StartFolderRO("default")
m.ScanFolder("default")
// Existing, shared file
@@ -470,6 +471,7 @@ func TestIgnores(t *testing.T) {
db, _ := leveldb.Open(storage.NewMemStorage(), nil)
m := NewModel(defaultConfig, "device", "syncthing", "dev", db)
m.AddFolder(defaultFolderConfig)
m.StartFolderRO("default")
expected := []string{
".*",