placement: Fix backwards compatibility for copies_number #474

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:fix-copies-number into master 2023-06-27 09:53:18 +00:00

View file

@ -86,7 +86,7 @@ func NewTraverser(opts ...Option) (*Traverser, error) {
}
// backward compatibility for scalar `copies_number`
if len(cfg.copyNumbers) == 1 {
if len(cfg.copyNumbers) == 1 && cfg.copyNumbers[0] != 0 {
cfg.flatSuccess = &cfg.copyNumbers[0]
}