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>
|
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.
|
||||||
|
10
src/utils.c
10
src/utils.c
@ -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))
|
|
||||||
{
|
{
|
||||||
if (fnmatch (*x, s, FNM_PATHNAME) == 0)
|
/* Remove leading '/' if ALLABS */
|
||||||
|
char *p = *x + ((flags & ALLABS) && (**x == '/'));
|
||||||
|
if (has_wildcards_p (p))
|
||||||
|
{
|
||||||
|
if (fnmatch (p, s, FNM_PATHNAME) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *p = *x + ((flags & ALLABS) && (**x == '/')); /* Remove '/' */
|
|
||||||
if (frontcmp (p, s))
|
if (frontcmp (p, s))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return *x;
|
return *x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user