mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] descend_url_p: When resolving no_parent, compare with the start url,
not the parent url. Published in <sxspu614ikm.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
c99228cab2
commit
39482df431
@ -1,3 +1,9 @@
|
|||||||
|
2001-11-29 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
|
* recur.c (descend_url_p): When resolving no_parent, compare with
|
||||||
|
start_url, not parent url. Otherwise link from /a/b/ to /a/c/
|
||||||
|
wouldn't be followed, although the download started from /a/.
|
||||||
|
|
||||||
2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
|
2001-01-23 Herold Heiko <Heiko.Herold@previnet.it>
|
||||||
|
|
||||||
* config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
|
* config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for
|
||||||
|
11
src/recur.c
11
src/recur.c
@ -437,13 +437,14 @@ descend_url_p (const struct urlpos *upos, struct url *parent, int depth,
|
|||||||
If we descended to a different host or changed the scheme, ignore
|
If we descended to a different host or changed the scheme, ignore
|
||||||
opt.no_parent. Also ignore it for -p leaf retrievals. */
|
opt.no_parent. Also ignore it for -p leaf retrievals. */
|
||||||
if (opt.no_parent
|
if (opt.no_parent
|
||||||
&& u->scheme == parent->scheme
|
&& u->scheme == start_url_parsed->scheme
|
||||||
&& 0 == strcasecmp (u->host, parent->host)
|
&& 0 == strcasecmp (u->host, start_url_parsed->host)
|
||||||
&& u->port == parent->port)
|
&& u->port == start_url_parsed->port)
|
||||||
{
|
{
|
||||||
if (!frontcmp (parent->dir, u->dir))
|
if (!frontcmp (start_url_parsed->dir, u->dir))
|
||||||
{
|
{
|
||||||
DEBUGP (("Trying to escape the root directory with no_parent in effect.\n"));
|
DEBUGP (("Going to \"%s\" would escape \"%s\" with no_parent on.\n",
|
||||||
|
u->dir, start_url_parsed->dir));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user