On Monday 10 April 2006 13:15, Martin Simmons wrote:
> >>>>> On Mon, 10 Apr 2006 12:22:59 +0200, Kern Sibbald <[EMAIL PROTECTED]>
> >>>>> said:
> >
> > Hello,
> >
> > It seems that it is becoming more frequent (probably because of the
> > increasing number of Bacula users) that users submit support questions to
> > the bugs database.  This morning a user submitted a bug stating that the
> > WildFile option was broken. Normally, I would have dismissed this as a
> > support problem because most of us realize that wild-cards and regexes
> > are awfully tricky.
> >
> > However, this user presented a *really* simple case with debug output, so
> > I took a look at it, and surprise both WildFile and RegexFile are broken
> > because they match against the full path and filename rather than just
> > the filename.
> >
> > I wonder how many users have torn out their hair trying to figure out why
> > WildFile or RegexFile didn't work :-(
>
> Are you really sure that is a bug?  I think the word "filename" in the
> documentation is ambiguous, but when it says "No directories will be
> matched by this directive" it does not mean that the matching is performed
> only on the basename part.

Yes, that is the way it is supposed to work, otherwise, what is the difference 
between WildFile and Wild?  WildFile should compare only to the filename 
(basename), WildDir compares only to directories (it will not compare if the 
item is a file), and Wild compares against the full path + filename.

>
> The examples in "A Windows Example FileSet" are also written to assume that
> WildFile compares the whole name.

They were probably written by someone who was working around the problem.

>
> The current behaviour is very useful because it allows files in selected
> directories to be matched, without accidentally matching subdirectories (as
> Wild will do).

Well, WildFile will never match against a directory, either in the old broken 
code, or in the current code.  In both cases, any directories found are 
passed to WildDir, and files and special devices are passed to WildFile.

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to