diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-17 07:09:42 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-17 07:09:42 +0000 |
commit | 82afede9fa4729ed91e583b4432508f3c887cfdf (patch) | |
tree | ed1bc7d19969c16470dc7ed4344f5e28c27d012b /source3 | |
parent | 8a1c2e02984edd17e6ab0d5088a80c4dd5f9b933 (diff) | |
download | samba-82afede9fa4729ed91e583b4432508f3c887cfdf.tar.gz samba-82afede9fa4729ed91e583b4432508f3c887cfdf.tar.bz2 samba-82afede9fa4729ed91e583b4432508f3c887cfdf.zip |
Merged Andrew's wfw fix (2).
Jeremy.
(This used to be commit a4fb755a48d27f21bd0a5d9e9d1227a08c13bdff)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/ms_fnmatch.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/ms_fnmatch.c b/source3/lib/ms_fnmatch.c index c4ebaf6aa2..b4591c7dbc 100644 --- a/source3/lib/ms_fnmatch.c +++ b/source3/lib/ms_fnmatch.c @@ -47,27 +47,30 @@ static int ms_fnmatch_lanman_core(char *pattern, char *string) while ((c = *p++)) { switch (c) { case '.': + if (! *n) goto next; /* if (! *n && ! *p) goto match; */ if (*n != '.') goto nomatch; n++; break; case '?': + if (! *n) goto next; if ((*n == '.' && n[1] != '.') || ! *n) goto next; n++; break; case '>': + if (! *n) goto next; if (n[0] == '.') { if (! n[1] && ms_fnmatch_lanman_core(p, n+1) == 0) goto match; if (ms_fnmatch_lanman_core(p, n) == 0) goto match; goto nomatch; } - if (! *n) goto next; n++; break; case '*': + if (! *n) goto next; if (! *p) goto match; for (; *n; n++) { if (ms_fnmatch_lanman_core(p, n) == 0) goto match; @@ -119,7 +122,7 @@ static int ms_fnmatch_lanman1(char *pattern, char *string) { if (!strpbrk(pattern, "?*<>\"")) { if (strcmp(string,"..") == 0) string = "."; - return strcmp(pattern, string); + return strcasecmp(pattern, string); } if (strcmp(string,"..") == 0 || strcmp(string,".") == 0) { |