From 39482df43189696bb9e3fa9a078ce06f110f2817 Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 29 Nov 2001 09:04:28 -0800 Subject: [PATCH] [svn] descend_url_p: When resolving no_parent, compare with the start url, not the parent url. Published in . --- src/ChangeLog | 6 ++++++ src/recur.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fdb0ec9d..e157e109 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-11-29 Hrvoje Niksic + + * 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 * config.h.ms, mswindows.h: defined HAVE_ISATTY, use _isatty for diff --git a/src/recur.c b/src/recur.c index f312960a..0aa96498 100644 --- a/src/recur.c +++ b/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; } }