Skip to content

Unspecified behavior when compressing overwritten file #180

@marcospb19

Description

@marcospb19

You build the archive:

ouch compress * archive.tar.gz

If you go there and run it again:

ouch compress * archive.tar.gz

It will ask "do you wish to overwrite archive.tar.gz?

If you press Y, it will delete the file, open a new file for archive.tar.gz, but note that the same file was also passed as an input for this compression! (with * wildcard)

The same file is the input and output.

ouch will read the output file to add as input to the... same output file.

Also:

ouch compress LICENSE a.zip

Then

ouch compress a.zip a.zip a.zip a.zip

Maybe just adding a FinalError for when the output file was passed as input too would solve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions