You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Archive testB.zip: Do you want to overwrite './test'? [Y/n] n
Archive testC.zip: Do you want to overwrite './test'? [Y/n] Y
Great, I like the archive name with the question. Greelight given ✔️.
Second part:
The user should be prompted multiple times, one after another with specification of which archive is asking to overwrite the specified files.
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.
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.
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: