lib/model, lib/config: Support "live" device removal, folder unsharing and folder configuration changes
Furthermore: 1. Cleans configs received, migrates them as we receive them. 2. Clears indexes of devices we no longer share the folder with GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3478
This commit is contained in:
@@ -136,6 +136,10 @@ func (w *Wrapper) Replace(cfg Configuration) error {
|
||||
func (w *Wrapper) replaceLocked(to Configuration) error {
|
||||
from := w.cfg
|
||||
|
||||
if err := to.clean(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, sub := range w.subs {
|
||||
l.Debugln(sub, "verifying configuration")
|
||||
if err := sub.VerifyConfiguration(from, to); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user