Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single files with different paggind are not merged #15

Open
asergunov opened this issue Mar 9, 2018 · 0 comments
Open

Single files with different paggind are not merged #15

asergunov opened this issue Mar 9, 2018 · 0 comments

Comments

@asergunov
Copy link

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));
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant