Skip to content

--patch-from fails to work on pipes #2195

@cpba

Description

@cpba

Describe the bug

Trying to compress from a pipe using --patch-from fails.

To Reproduce

cat foo | zstd --patch-from=bar -o patch.zstd

Outputs:

zstd: fileio.c:774: FIO_adjustMemLimitForPatchFromMode: Assertion `maxSize != UTIL_FILESIZE_UNKNOWN' failed.

Similarly adding --long and or --memory produces the same result:

cat foo | zstd --long --patch-from=bar -o patch.zstd

zstd: fileio.c:774: FIO_adjustMemLimitForPatchFromMode: Assertion `maxSize != UTIL_FILESIZE_UNKNOWN' failed.

Expected behavior

Using --patch-from in this manner should produce a working patch.

If patching from stdin is not possible, it'd be preferable to print an error message explaining the situation.

Desktop (please complete the following information):

  • OS: fedora
  • Version: 32
  • Compiler: gcc
  • Build system: meson

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions