-
Notifications
You must be signed in to change notification settings - Fork 78
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
Comments
First part:
Great, I like the archive name with the question. Greelight given ✔️. Second part:
About being prompted one after another, I don't know how that could be implemented, we iterate on each file and check if it conflicts. But we don't know upfront whether or not paths will conflict. Checking for all conflicts before decompressing should be possible for ".zip" since the header concentrates all paths, but I'm not sure about ".tar.gz", at least not without having to decompress it twice, which is undesirable. Maybe it's possible to iterate through every .tar.gz file without really reading its contents, and this might be fast enough, but we'd need some benchmarks to make sure. Would need someone to figure this out for me. |
How about stopping the decompression whenever a conflict is detected and then wait for the user input to decide whether to overwrite the file or not? I believe this is also quite common behavior for this kind of issue. |
You can do so by decompressing 1 archive at a time, unfortunately, because Ouch descompresses in parallel, this is hard to do, even if we paused the other threads, we wouldn't be able to make it in a way that subsequent questions from the same archive appear one after the other. |
One more common solution would be to add "overwrite all" to the possible responses the user can provide. However this issue may not be that relevant anymore once #466 is fixed and defaults to merging empty directories. |
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
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:
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
The text was updated successfully, but these errors were encountered: