Open jeiea opened 1 year ago
A different use case where this behavior is relevant, is when decompressing multiple archive files that contain the same directory structure but different files:
Say I have a compressed directory with a series of pdf files that are sorted by topic and split into different compressed files.
Example:
/mathBooks/bookA.pdf
/mathBooks/bookB.pdf
/mathBooks/bookC.pdf
Now I compress this directory and split it three ways, one archive for each book.
If I decompress these archives with ouch, I will only receive
/mathBooks/bookC.pdf
Since all archives share the same directory name mathBooks
, all files of the previously decompressed archives are deleted, even though they do not contain any conflicting files.
Expected Behavior When no conflicting files are present, the decompressed directories should be merged by default. (This seems to be the default for other decompression tools as well.)
Version
0.4.1
Description
It looks like ouch is asking the user if they want to overwrite the directory to be unpacked when the contents to be extracted overlap.
I expected it to preserve the original directory contents, but it doesn't. It completely removes the directory contents first. I think the prompt should clarify this behavior (purging the directory) at least, or preserve anything that is unrelated to extraction.
The following is example command.
Current Behavior
a.txt is deleted.
Expected Behavior
After executing above ls should print a.txt and b.txt.
Additional Information
No response