Skip to content

zstd won't remove the file after compression unless --rm is last argument #3719

@okias

Description

@okias

Describe the bug
zstd won't remove the file after compression when --rm argument is passed.

To Reproduce
Steps to reproduce the behavior:

  1. zstd --rm -f -T0 -8qc dir/file -o dir/file.zst
  2. ls dir/file
  3. file is still present

If --rm is placed as a last argument, for example zstd -T0 -8qc --rm dir/file -o dir/file.zst, removal works as expected.

Expected behavior
File is removed even when --rm is not last argument.

Desktop (please complete the following information):

  • OS: Debian 12 (bookworm) and Debian 13 (trixie)
  • Version 1.5.4+dfsg2-5 and 1.5.5+dfsg2-1

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions