On Monday 03 September 2007 23:14, Martin Simmons wrote: > >>>>> On Mon, 3 Sep 2007 13:45:48 +0200, Kern Sibbald said: > > > > Hello, > > > > You would think that wild cards (fnmatch) are well known and that they > > work the same on all systems. Apparently not. > > > > On GNU clib systems, > > > > fnmatch("a*b/*", "abbb/.x", FNM_PATHNAME|FNM_PERIOD) returns fail > > (i.e. FN_NOMATCH). > > > > and on my version of the BSD fnmatch.c it returns success. I could have > > messed up the code in porting it into Bacula, but I consider that > > *highly* unlikely. > > > > In reading the GNU documentation on fnmatch, it is not clear which is > > correct -- in fact, depending on nuances of precedences of the rules, > > which is not documented, both interpretations seem to be correct. > > > > Does anyone have any opinions? Am I missing something? > > > > I must admit: this is somewhat a tricky case. :-) > > It looks like the BSD code is broken. > > BTW, which documentation were you looking at?
The Linux documentation. Although I do think it is a bug, I still think the documentation is vague. A * is supposed to match any number of any characters, so does it take precedence over the FNM_PERIOD or does FNM_PERIOD take precedence over the action of *? I supposed like you that it is the latter, but it is not clearly specified. However, after looking at glob(7) it seems to be more explicitly stated (still a bit vague IMO). > To me, both the man pages on > GNU/Linux and FreeBSD are clear about FNM_PATHNAME making the period after > slash be a "leading" period, i.e. considered by FNM_PERIOD. > > __Martin > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Bacula-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/bacula-devel ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users