Skip to content

Single files with different paggind are not merged  #15

@asergunov

Description

@asergunov

Parsing files [file9.png, file10.png] gives two items even if mergePadding config is set. But [file8.png, file9.png, file10.png, file11.png] works.

This happened because splitAllAndSort function is called before merging padding in parse() function. And there we are losing index info for single items.

    if (bucket.splittable()) {
      const size_t index = getPivotIndex(strategy, bucket);
      if (index == LOCATION_NONE) {
        bucket.flatten(pusher);
      } else {
        bucket.split(index, pusher);
      }
    } else {
      if (bucket.single()) {
        bucket.flatten(pusher); // HERE WE ARE LOOSING INDECES
      } else {
        buckets.emplace_back(std::move(bucket));
      }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions