Andre Pang <[EMAIL PROTECTED]> writes:

> i'm proposing that -np should _not_ take affect when you are dealing
> with a page requisite (anything other than a .htm or a .html).

Yes, `-p' should override `-np' for the files that are downloaded only
because of `-p'.

> --- wget-1.6-orig/src/recur.c Mon Dec 18 06:28:20 2000
> +++ wget-1.6/src/recur.c      Tue Apr 10 09:54:31 2001
> @@ -283,9 +283,13 @@
>         if (!(base_dir && frontcmp (base_dir, u->dir)))
>           {
>             /* Failing that, check for parent dir.  */
> +           char *suf = NULL;
>             struct urlinfo *ut = newurl ();
> +           suf = suffix (constr);
>             if (parseurl (this_url, ut, 0) != URLOK)
>               DEBUGP (("Double yuck!  The *base* URL is broken.\n"));
> +           else if (opt.page_requisites && strcmp (suf, "html") && strcmp (suf, 
>"htm"))
> +             DEBUGP (("Escaping no_parent jail since this is a page requisite.\n"));
>             else if (!frontcmp (ut->dir, u->dir))
>               {
>                 /* Failing that too, kill the URL.  */

Thanks a lot for the patch.

If memory serves me, I think you need to free SUF after using it.
I'll leave it to Dan (author of `--page-requisits' and an active
maintainer) to review the patch before applying it.

Reply via email to