Hrvoje Niksic <[EMAIL PROTECTED]> writes:

> For me, this patch fixes the bug in both cases:

And introduces a new one.  This patch is required on top of the
previous one.  Or simply upgrade to the latest CVS.

2001-12-18  Hrvoje Niksic  <[EMAIL PROTECTED]>

        * recur.c (retrieve_tree): Make a copy of file obtained from
        dl_url_file_map because the code calls xfree(file) later.

Index: src/recur.c
===================================================================
RCS file: /pack/anoncvs/wget/src/recur.c,v
retrieving revision 1.39
diff -u -r1.39 recur.c
--- src/recur.c 2001/12/18 22:14:31     1.39
+++ src/recur.c 2001/12/18 22:18:50
@@ -228,15 +228,10 @@
         the second time.  */
       if (dl_url_file_map && hash_table_contains (dl_url_file_map, url))
        {
-         file = hash_table_get (dl_url_file_map, url);
+         file = xstrdup (hash_table_get (dl_url_file_map, url));
 
          DEBUGP (("Already downloaded \"%s\", reusing it from \"%s\".\n",
                   url, file));
-
-         /* #### This check might be horribly slow when downloading
-            sites with a huge number of HTML docs.  Use a hash table
-            instead!  Thankfully, it gets tripped only when you use
-            `wget -r URL1 URL2 ...', as explained above.  */
 
          if (string_set_contains (downloaded_html_set, file))
            descend = 1;

Reply via email to