mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
This commit is contained in:
parent
e071f16531
commit
3a6ebb8482
@ -7,6 +7,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
)
|
||||
|
||||
@ -65,3 +66,10 @@ func deduplicateObservedFoldersToMap(input []ObservedFolder) map[string]Observed
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
func (cfg *DeviceConfiguration) Description() string {
|
||||
if cfg.Name == "" {
|
||||
return fmt.Sprintf("%s", cfg.DeviceID.Short())
|
||||
}
|
||||
return fmt.Sprintf("%s (%s)", cfg.Name, cfg.DeviceID.Short())
|
||||
}
|
||||
|
@ -1198,6 +1198,13 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
|
||||
ccDeviceInfos[folder.ID] = info
|
||||
}
|
||||
|
||||
for _, info := range ccDeviceInfos {
|
||||
if deviceCfg.Introducer && info.local.Introducer {
|
||||
l.Warnf("Remote %v is an introducer to us, and we are to them - only one should be introducer to the other, see https://docs.syncthing.net/users/introducer.html", deviceCfg.Description())
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
// Needs to happen outside of the fmut, as can cause CommitConfiguration
|
||||
if deviceCfg.AutoAcceptFolders {
|
||||
w, _ := m.cfg.Modify(func(cfg *config.Configuration) {
|
||||
|
Loading…
Reference in New Issue
Block a user