lib/config, lib/model: Include paused folders in cluster config (fixes #4897)

This commit is contained in:
Simon Frei
2018-04-22 18:01:52 +02:00
committed by Audrius Butkevicius
parent 56cf2db68b
commit f6458d1b8f
5 changed files with 79 additions and 29 deletions

View File

@@ -267,6 +267,13 @@ func (w *Wrapper) Folders() map[string]FolderConfiguration {
return w.folderMap
}
// FolderList returns a slice of folders.
func (w *Wrapper) FolderList() []FolderConfiguration {
w.mut.Lock()
defer w.mut.Unlock()
return append([]FolderConfiguration(nil), w.cfg.Folders...)
}
// SetFolder adds a new folder to the configuration, or overwrites an existing
// folder with the same ID.
func (w *Wrapper) SetFolder(fld FolderConfiguration) (Waiter, error) {