mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Allow repo mismatches to proceed (ref #223)
This commit is contained in:
parent
b44016ff70
commit
5369a62fd5
@ -244,7 +244,7 @@ func Load(rd io.Reader, myID string) (Configuration, error) {
|
|||||||
repo := &cfg.Repositories[i]
|
repo := &cfg.Repositories[i]
|
||||||
|
|
||||||
if len(repo.Directory) == 0 {
|
if len(repo.Directory) == 0 {
|
||||||
repo.Invalid = "empty directory"
|
repo.Invalid = "no directory configured"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,8 @@ func (m *Model) Index(nodeID string, repo string, fs []protocol.FileInfo) {
|
|||||||
if r, ok := m.repoFiles[repo]; ok {
|
if r, ok := m.repoFiles[repo]; ok {
|
||||||
r.Replace(id, files)
|
r.Replace(id, files)
|
||||||
} else {
|
} else {
|
||||||
l.Warnf("Index from %s for nonexistant repo %q; dropping", nodeID, repo)
|
l.Warnf("Index from %s for unexpected repo %q; verify configuration", nodeID, repo)
|
||||||
|
|
||||||
}
|
}
|
||||||
m.rmut.RUnlock()
|
m.rmut.RUnlock()
|
||||||
}
|
}
|
||||||
|
@ -81,17 +81,8 @@ func compareClusterConfig(local, remote protocol.ClusterConfigMessage) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return ClusterConfigMismatch(fmt.Errorf("remote is missing repository %q", repo))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for repo := range rm {
|
|
||||||
if _, ok := lm[repo]; !ok {
|
|
||||||
return ClusterConfigMismatch(fmt.Errorf("remote has extra repository %q", repo))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user