Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompressing multiple archives conflicts with overwrite prompt #727

Open
valoq opened this issue Oct 9, 2024 · 0 comments
Open

Decompressing multiple archives conflicts with overwrite prompt #727

valoq opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@valoq
Copy link

valoq commented Oct 9, 2024

Version

0.5.1

Description

When decompressing multiple archives that contain the same file or directory names, ouch asks the user if the files should be overwritten multiple times, which can also be a random archive in the list:

Current Behavior

ouch decompress testA.zip testB.zip testC.zip
[INFO] Created temporary directory /tmp/experiment/./.tmpBER78Y to hold decompressed elements.
[INFO] File 0 extracted to "/tmp/experiment/./.tmpBER78Y/test/"
[INFO] Created temporary directory /tmp/experiment/./.tmpt6Uh2b to hold decompressed elements.
[INFO] ".tmpBER78Y/test/a" extracted. (4.00 B)
[INFO] Created temporary directory /tmp/experiment/./.tmp8oJZxo to hold decompressed elements.
[INFO] File 0 extracted to "/tmp/experiment/./.tmpt6Uh2b/test/"
[INFO] Successfully moved /tmp/experiment/./.tmpBER78Y/test to ./test.
[INFO] File 0 extracted to "/tmp/experiment/./.tmp8oJZxo/test/"
[INFO] Successfully decompressed archive in current directory (2 files).
[INFO] ".tmpt6Uh2b/test/b" extracted. (4.00 B)
[INFO] ".tmp8oJZxo/test/c" extracted. (4.00 B)
Do you want to overwrite './test'? [Y/n] Do you want to overwrite './test'? [Y/n]

Expected Behavior

The user should be prompted multiple times, one after another with specification of which archive is asking to overwrite the specified files.

Example:

Archive testB.zip: Do you want to overwrite './test'? [Y/n] n
Archive testC.zip: Do you want to overwrite './test'? [Y/n] Y

Additional Information

The example used in this report should not ask to overwrite any data since there are not file conflicts (directories with the same name should not be considered a conflict by default) See #466

(The test archives all contain the folder test and a single text file a, b and c respectively)
testA.zip
testB.zip
testC.zip

@valoq valoq added the bug Something isn't working label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant