> Thanks for the advice.  Just changing the option name, but using the old 
> pattern syntax, didn't work in all cases, though.
> 
> I created a better testcase:
> # mkdir -p /tmp/clamtest/test1 /tmp/clamtest/kde-htest
> # mkdir -p /clamtest/test1
> # touch /tmp/clamtest/test1/clamtest.test1.sample.file
> # cp /tmp/kde-htest/konqueror-crash-Gpj9Ca.log /tmp/clamtest/kde-htest/
> # touch /clamtest/test1/clamtest.test1.sample.file
> # touch /clamtest/test1/junk
> # clamscan -r --exclude-dir=//clamtest/ /tmp /clamtest
> /tmp/clamtest/tmp.clamtest.sample.file: Empty file
> /tmp/clamtest/kde-htest/konqueror-crash-Gpj9Ca.log: OK
> /tmp/clamtest/tmp/temp.clamtest.tmp.sample.file: OK
> /tmp/.X0-lock: OK
> /clamtest/test1/clamtest.test1.sample.file: Empty file
> /clamtest/test1/junk: Empty file
> 
> So just changing from --exclude to --exclude-dir, using the original syntax 
> for PATT of // to indicate a root directory doesn't work.
> 
> Later Internet search on "--exclude-dir" turned up 
> http://www.linuxforums.org/forum/redhat-fedora-linux-help/56093-clam-av.html
> which shows the Fedora version of   clamscan --help   saying that the syntax 
> is "--exclude-dir=REGEX"
> 
> I tested this and found that it works:
> # clamscan -r --exclude-dir=^/clamtest/ /tmp /clamtest
> /tmp/clamtest/tmp.clamtest.sample.file: Empty file
> /tmp/clamtest/kde-htest/konqueror-crash-Gpj9Ca.log: OK
> /tmp/clamtest/tmp/temp.clamtest.tmp.sample.file: OK
> /tmp/.X0-lock: OK
> /clamtest: Excluded
> 
> So sometime between clamav 0.92.1 and 0.94.dfsg.2-1lenny2, the syntax for 
> --exclude-dir=PATT (and related options) changed to require PATT to be a 
> regular expression.
> 
> Is there any chance of getting the man page and  --help  output changed to 
> say REGEX instead of PATT?
> 

I'll let upstream know about this. In fact, the --help output depends on some
nowadays unused preprocessor option and thus does not reflect the actual
behavior. It's using regular expressions in all cases now.

Best,
Michael

Attachment: pgpWNZLoYF8a0.pgp
Description: PGP signature

_______________________________________________
Pkg-clamav-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-clamav-devel

Reply via email to