Skip to content

Should zstd delete incomplete archives? #4007

Open
@Mitmischer

Description

@Mitmischer

Is your feature request related to a problem? Please describe.
The last issue related to #4005 and maybe the most debatable.
When the disk fills up during compression, the resulting archive will be corrupt. It's kept by zstd and not deleted.
That gives a false sense of security and may evoke some annoying post-processing to find and remove corrupt archives.
To me, corrupt archives have no benefit as long as the source file still exists (which must be checked prior to archive deletion).

Describe the solution you'd like
zstd should remove corrupt archives it produces.
Make it an instant operation to check that the archive is corrupt (maybe by altering a critical checksum/flag in the first bytes of the archive). Currently, zstd will notice the corruption as a premature end (which is good), but is has to read the whole archive for that. That's unnecessary.

Describe alternatives you've considered
Keep the current behavior, that is however one probable cause for issues #4005 and #4006.

Additional context
None.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions