Skip to content

tar is closed before gzip writer #183

@michalmiddleton

Description

@michalmiddleton

Describe the bug
Hi, while poking around and testing zstd compression instead of gzip, I think I discovered a logical error in the code.
It's quite possible this issue never surfaced when using gzip.

Issue:
When closing file, tar and gzip writers, tar writer gets closed before gzip writer:

err = gzipWriter.Close()

Imo, the order of closing should be gzip -> tar -> file.

I noticed it when troubleshooting one zst archive that had a corrupted block at the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions