1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Fix -X/-I with wildcards.

This commit is contained in:
hniksic 2005-05-05 08:22:11 -07:00
parent 4810f65361
commit 30b7d60805
2 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2005-05-05 Charles C.Fu <ccwf@bacchus.com>
* utils.c (proclist): Strip leading slash when calling fnmatch
too, otherwise wildcard comparisons always fail.
2005-05-05 Hrvoje Niksic <hniksic@xemacs.org> 2005-05-05 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (touch): Set access time to current time. * utils.c (touch): Set access time to current time.

View File

@ -681,19 +681,21 @@ static char *
proclist (char **strlist, const char *s, enum accd flags) proclist (char **strlist, const char *s, enum accd flags)
{ {
char **x; char **x;
for (x = strlist; *x; x++) for (x = strlist; *x; x++)
if (has_wildcards_p (*x)) {
{ /* Remove leading '/' if ALLABS */
if (fnmatch (*x, s, FNM_PATHNAME) == 0) char *p = *x + ((flags & ALLABS) && (**x == '/'));
break; if (has_wildcards_p (p))
} {
else if (fnmatch (p, s, FNM_PATHNAME) == 0)
{ break;
char *p = *x + ((flags & ALLABS) && (**x == '/')); /* Remove '/' */ }
if (frontcmp (p, s)) else
break; {
} if (frontcmp (p, s))
break;
}
}
return *x; return *x;
} }