|
|
@@ -335,10 +335,20 @@ func (cfg *Configuration) prepare(myID protocol.DeviceID) {
|
|
|
sort.Sort(DeviceConfigurationList(cfg.Devices))
|
|
|
// Ensure that any loose devices are not present in the wrong places
|
|
|
// Ensure that there are no duplicate devices
|
|
|
+ // Ensure that puller settings are sane
|
|
|
for i := range cfg.Folders {
|
|
|
cfg.Folders[i].Devices = ensureDevicePresent(cfg.Folders[i].Devices, myID)
|
|
|
cfg.Folders[i].Devices = ensureExistingDevices(cfg.Folders[i].Devices, existingDevices)
|
|
|
cfg.Folders[i].Devices = ensureNoDuplicates(cfg.Folders[i].Devices)
|
|
|
+ if cfg.Folders[i].Copiers == 0 {
|
|
|
+ cfg.Folders[i].Copiers = 1
|
|
|
+ }
|
|
|
+ if cfg.Folders[i].Pullers == 0 {
|
|
|
+ cfg.Folders[i].Pullers = 16
|
|
|
+ }
|
|
|
+ if cfg.Folders[i].Finishers == 0 {
|
|
|
+ cfg.Folders[i].Finishers = 1
|
|
|
+ }
|
|
|
sort.Sort(FolderDeviceConfigurationList(cfg.Folders[i].Devices))
|
|
|
}
|
|
|
|