On Thu, 15 Sep 2005 14:32:25 -0700
Eric Berggren <[EMAIL PROTECTED]> wrote:

> The current implementation of --exclude (and --exclude-dir) performs the
> pruning AFTER descending/scanning those files.

That's not true for --exclude-dir.

> The problem for us is that one of the areas we scan is via NFS on a
> NetApp filer, and upon finding the built-in .snapshot directory (which
> holds daily read-only snapshots of this hiearchy), spends the next week
> traversing 30+ copies of the same files. --exclude (and --exclude-dir)
> doesn't help us as implemented.
> 
> Attached is a patch we've been using since 0.75 (this one against
> 0.86.2) that uses --exclude to prevent traversing into treewalk() if the
> regexp is on the list. Thus if we specify "--exclude=.snapshot", that
> directory (regardless where) is completely skipped, as well as our
> quarantine area.

That's exactly what --exclude-dir does. (BTW: there was a bug in
--exclude-dir when it was used multiple times, now fixed in CVS)

> Don't understand why --exclude-dir is needed at all

The two options --exclude and --exclude-dir were seperated for safety
reasons. As you can see in the changelog, the first change was to use
--exclude both for files and directories. Unfortunately, using
--exclude in the both cases is not always safe because a too generic
regular expression for excluding some files could also block many
directories.

Tue Mar  1 02:29:54 CET 2005 (tk)
---------------------------------
  * clamscan: use --include-dir/exclude-dir for directories instead of
              --include/exclude

Tue Mar  1 02:16:15 CET 2005 (tk)
---------------------------------
  * clamscan: respect --exclude/include when entering directories
              (requested by Dean Plant <dean.plant*roke.co.uk>)

-- 
   oo    .....         Tomasz Kojm <[EMAIL PROTECTED]>
  (\/)\.........         http://www.ClamAV.net/gpg/tkojm.gpg
     \..........._         0DCA5A08407D5288279DB43454822DC8985A444B
       //\   /\              Tue Nov 15 21:14:49 CET 2005

Attachment: signature.asc
Description: PGP signature

_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to