Hi, Carsten.  In the future please send such mail to [EMAIL PROTECTED], as is
documented, NOT to me directly.

Carsten Mackenroth <[EMAIL PROTECTED]> writes:
> Hi,
> 
> wget 1.6 has a problem when called with --convert-links and multiple
> URLs. Something like
>   wget --timestamping --convert-links --backup-converted \
>   --page-requisites http://localhost/ http://localhost/site-docs/
> correctly fixes the links in localhost/index.html, but not in
> localhost/site-docs/index.html (both are directory listings with icons).
> 
> It seems that only the first URL is added to urls_html and downloaded_urls
> in src/recur.c:recursive_retrieve(), because only then first_time is true.
> Here is a patch that fixes this. It is mainly copied from the if(first_time)
> section and propably not a very clean solution (basedir ? err != URLOK ?),
> but at least it works in my case and can give you a hint where the problem
> is.

Funny timing -- we were just discussing this issue on the wget list (or
perhaps you read that)?

> --- src/recur.c       Sun Dec 17 20:28:20 2000
> +++ src/recur.c.new   Sun Mar 25 20:25:12 2001
> @@ -165,7 +165,18 @@
>        first_time = 0;
>      }
>    else
> +    {
> +    u = newurl ();
> +    err = parseurl (this_url, u, 0);
> +    if (err == URLOK)
> +      {
> +        ulist = add_slist (ulist, u->url, 0); /* ??? */
> +     urls_downloaded = add_url (urls_downloaded, u->url, file);
> +     urls_html = add_slist (urls_html, file, NOSORT);
> +      }
> +    freeurl(u, 1);            
>      ++depth;
> +    }
>  
>    if (opt.reclevel != INFINITE_RECURSION && depth > opt.reclevel)
>      /* We've exceeded the maximum recursion depth specified by the user. */

Thanks for the patch, Carsten.  Hopefully someone will have time to review
it soon and apply it if it's appropriate.  

Does this look like the right fix, Hrvoje?

---------------------------------------------------------------
Dan Harkless            | To help prevent SPAM contamination,
GNU Wget co-maintainer  | please do not mention this email
http://sunsite.dk/wget/ | address in Usenet posts -- thank you.

Reply via email to