Revert "lib/model: Add folders on start in model (#6135)"

This reverts commit bee7cce081.
This commit is contained in:
Jakob Borg
2019-11-24 09:33:58 +01:00
parent 6d27cf6563
commit 45a711570e
8 changed files with 61 additions and 54 deletions
+6 -6
View File
@@ -301,8 +301,8 @@ func pullInvalidIgnored(t *testing.T, ft config.FolderType) {
m := setupModel(w)
defer cleanupModelAndRemoveDir(m, fss.URI())
m.removeFolder(fcfg)
m.addFolder(fcfg)
m.RemoveFolder(fcfg)
m.AddFolder(fcfg)
// Reach in and update the ignore matcher to one that always does
// reloads when asked to, instead of checking file mtimes. This is
// because we might be changing the files on disk often enough that the
@@ -310,7 +310,7 @@ func pullInvalidIgnored(t *testing.T, ft config.FolderType) {
m.fmut.Lock()
m.folderIgnores["default"] = ignore.New(fss, ignore.WithChangeDetector(newAlwaysChanged()))
m.fmut.Unlock()
m.startFolder(fcfg.ID)
m.StartFolder(fcfg.ID)
fc := addFakeConn(m, device1)
fc.folder = "default"
@@ -1038,8 +1038,8 @@ func TestIgnoreDeleteUnignore(t *testing.T) {
tmpDir := fss.URI()
defer cleanupModelAndRemoveDir(m, tmpDir)
m.removeFolder(fcfg)
m.addFolder(fcfg)
m.RemoveFolder(fcfg)
m.AddFolder(fcfg)
// Reach in and update the ignore matcher to one that always does
// reloads when asked to, instead of checking file mtimes. This is
// because we might be changing the files on disk often enough that the
@@ -1047,7 +1047,7 @@ func TestIgnoreDeleteUnignore(t *testing.T) {
m.fmut.Lock()
m.folderIgnores["default"] = ignore.New(fss, ignore.WithChangeDetector(newAlwaysChanged()))
m.fmut.Unlock()
m.startFolder(fcfg.ID)
m.StartFolder(fcfg.ID)
fc := addFakeConn(m, device1)
fc.folder = "default"