dtrx-py/dtrx

recursive AND list

delanym opened this issue · 3 comments

The -l switch doesn't work recursively.

noahp commented

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 😕

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.

+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.