]> sjero.net Git - wget/commitdiff
[svn] descend_url_p: When resolving no_parent, compare with the start url,
authorhniksic <devnull@localhost>
Thu, 29 Nov 2001 17:04:28 +0000 (09:04 -0800)
committerhniksic <devnull@localhost>
Thu, 29 Nov 2001 17:04:28 +0000 (09:04 -0800)
not the parent url.
Published in <sxspu614ikm.fsf@florida.arsdigita.de>.

src/ChangeLog
src/recur.c

index fdb0ec9d62b4a43dcd5404d31b4ea6d92821a1a4..e157e1098442399eba5f42cf2614f8290b1986cf 100644 (file)
@@ -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
index f312960aa8880251ee1ae7bfa08c16e31d7eed45..0aa96498fa2c9cb059bef6164996e7d836b891d1 100644 (file)
@@ -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;
        }
     }