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:
parent
4810f65361
commit
30b7d60805
@ -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.
|
||||
|
26
src/utils.c
26
src/utils.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user