lib/config: Change folder type attribute to a FolderType type

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3032
This commit is contained in:
Jakob Borg
2016-05-04 11:26:36 +00:00
committed by Audrius Butkevicius
parent eabd2fc936
commit 09832abe50
7 changed files with 48 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ func TestOverride(t *testing.T) {
id, _ := protocol.DeviceIDFromString(id1)
cfg, _ := config.Load("h1/config.xml", id)
fld := cfg.Folders()["default"]
fld.ReadOnly = true
fld.Type = config.FolderTypeReadOnly
cfg.SetFolder(fld)
os.Rename("h1/config.xml", "h1/config.xml.orig")
defer osutil.Rename("h1/config.xml.orig", "h1/config.xml")