Skip to content

Conversation

@cgbur
Copy link
Contributor

@cgbur cgbur commented Jul 27, 2022

Fixes passthrough on files with fewer than 4 magic bytes by checking if passthrough is enabled before exiting with an error. If force is enabled and destination is stdout, the bytes are copied as-is to the output.

Changes:

  • add a check for passthrough if we read fewer than 4 bytes (zstd magic length)
  • add a test to ensure passthrough works on short files

fixes: #3210
review @terrelln

Copy link
Contributor

@terrelln terrelln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for the PR!

@terrelln terrelln merged commit 2b9fde9 into facebook:dev Jul 29, 2022
@Cyan4973 Cyan4973 mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passthrough on short files fails

3 participants