Page 1 of 1

Normal Behaviour for "Recurse Subdirectories"

Posted: Sat Aug 06, 2005 10:35 pm
by Ambush Commander
I've been writing a wrapper class for 7-Zip with unit testing and a strange thing confronted me the other way: When I performed a query like this:

Code: Select all

7z a -r- archive.7z -i!"files/*"
With -r- flag disabling recursion and * a wildcard ("files/*" being the files I want to compress), it still compressed all the files in the subdirectories of files. I found this behaviour a little strange and so did some other people on the Help forum, apparently. Unfortunantely, 7-Zip's maintainer Igor Pavlov says that (and I'm paraphrasing) the recursion parameter is for file wildcards like *.doc and *.txt (not suprisingly, he's right, those parameters do work). However, I think this is extremely counter-intuitive.

Can other people back me up on this claim? And if this really indeed the case (the behaviour of the recurse is incorrect), should I have the interface I provide for recursion transparently "fix" this bug (done by excluding files like: "files/*/")?

Edit - Fix AOL smurfing of r's

Posted: Sat Aug 06, 2005 10:42 pm
by feyd
I smell herring.... :?

Posted: Sat Aug 06, 2005 10:46 pm
by Ambush Commander
Err... you mean a "red herring"?

If * is a wildcard, then with recursion, * selects all files in all subdirs, and without it, * just selects in the root folder and doesn't go into the subdirs... hmph... it must be how you define a wildcard, isn't it?

Posted: Sat Aug 06, 2005 11:28 pm
by feyd
yeah.. it hindges on his definition of wildcard.. It's behaviour is against what I'd consider S.O.P. for them...