Skip to content

Disable smart unpack when --dir is provided #322

@marcospb19

Description

@marcospb19

When decompressing an archive, there is a risk of messing up the current folder, if the archive is huge it will mix your folder with a lot of files and you'll have a hard time trying to clean it up afterwards.

To solve this, Ouch has a hidden feature called "smart unpack", when it detects that an archive has more than one file, it creates a new folder and unpacks all the contents inside of that folder, so cleaning up is as simple as deleting that folder.

However, if the user specified a target directory with --dir, we could (?) assume they intentionally want to decompress it into that folder directly, so "smart unpack" can be disabled, it will just create an unwanted nested folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions