Skip to content

Commit

Permalink
lib/model: Fixed adding empty items to device list (fixes syncthing#8646
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Ratio2 committed Nov 5, 2022
1 parent fbdaa26 commit 0508035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/model.go
Expand Up @@ -1276,7 +1276,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
for _, fcfg := range folders {
cfg.Folders = append(cfg.Folders, fcfg)
}
cfg.Devices = make([]config.DeviceConfiguration, len(devices))
cfg.Devices = make([]config.DeviceConfiguration, 0, len(devices))
for _, dcfg := range devices {
cfg.Devices = append(cfg.Devices, dcfg)
}
Expand Down

0 comments on commit 0508035

Please sign in to comment.