aboutsummaryrefslogtreecommitdiffstats
path: root/lib/folder/folder-pathmap.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/folder/folder-pathmap.go')
-rw-r--r--lib/folder/folder-pathmap.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/folder/folder-pathmap.go b/lib/folder/folder-pathmap.go
index e200164..c5691a3 100644
--- a/lib/folder/folder-pathmap.go
+++ b/lib/folder/folder-pathmap.go
@@ -145,6 +145,15 @@ func (f *PathMap) Remove() error {
return nil
}
+// Update update some fields of a folder
+func (f *PathMap) Update(cfg FolderConfig) (*FolderConfig, error) {
+ if f.config.ID != cfg.ID {
+ return nil, fmt.Errorf("Invalid id")
+ }
+ f.config = cfg
+ return &f.config, nil
+}
+
// RegisterEventChange requests registration for folder change event
func (f *PathMap) RegisterEventChange(cb *EventCB, data *EventCBData) error {
return nil