>>>>> 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? 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-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users