mirror of
https://github.com/mirror/wget.git
synced 2025-01-16 15:21:14 +08: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>
|
||||
|
||||
* 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
|
||||
opt.no_parent. Also ignore it for -p leaf retrievals. */
|
||||
if (opt.no_parent
|
||||
&& u->scheme == parent->scheme
|
||||
&& 0 == strcasecmp (u->host, parent->host)
|
||||
&& u->port == parent->port)
|
||||
&& u->scheme == start_url_parsed->scheme
|
||||
&& 0 == strcasecmp (u->host, start_url_parsed->host)
|
||||
&& 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user