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>
* 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)
{
char **x;
for (x = strlist; *x; x++)
if (has_wildcards_p (*x))
{
if (fnmatch (*x, s, FNM_PATHNAME) == 0)
break;
}
else
{
char *p = *x + ((flags & ALLABS) && (**x == '/')); /* Remove '/' */
if (frontcmp (p, s))
break;
}
{
/* Remove leading '/' if ALLABS */
char *p = *x + ((flags & ALLABS) && (**x == '/'));
if (has_wildcards_p (p))
{
if (fnmatch (p, s, FNM_PATHNAME) == 0)
break;
}
else
{
if (frontcmp (p, s))
break;
}
}
return *x;
}