dtrx-py / dtrx

Do The Right Extraction
GNU General Public License v3.0
224 stars 10 forks source link

recursive AND list #10

Open delanym opened 3 years ago

delanym commented 3 years ago

The -l switch doesn't work recursively.

noahp commented 3 years ago

This is a bit tricky, I think- the archives are not unpacked when using the -l list switch, we rely on the actual unpacking tool to do the listing. To recursively list, we'd probably need to unpack the archive then list :confused:

dilinger commented 2 years ago

Hm, maybe -l should warn when it is run with -r as well? "Warning: cannot list contents of archives recursively"? Or even refuse to run, considering them incompatible arguments.

Although it would be cool to make this work, but I don't see how without unpacking. Especially given the differences between archives; some (like tar) can handle unpacking just a single subfile, but I'm not sure that they can all do that.

KaKi87 commented 1 year ago

+1 for outputting a warning or throwing an error.

However, the program should never unpack files when only asked to list, even if it would be in a cache directory, because it would take energy and space while the user doesn't expect it.