]> sjero.net Git - wget/blobdiff - src/main.c
[svn] Fixed recursive FTP retrieval over proxy.
[wget] / src / main.c
index 1f3fb25a2172f90de209b9dc31e6807482611766..e84efddcad92cffe3f940d10fa1f6a798b24fb8f 100644 (file)
@@ -945,10 +945,20 @@ Can't timestamp and not clobber old files at the same time.\n"));
       int dt;
 
       if ((opt.recursive || opt.page_requisites)
-         && url_scheme (*t) != SCHEME_FTP)
-       status = retrieve_tree (*t);
+         && (url_scheme (*t) != SCHEME_FTP || opt.use_proxy))
+       {
+         int old_follow_ftp = opt.follow_ftp;
+
+         /* Turn opt.follow_ftp on in case of recursive FTP retrieval */
+         if (url_scheme (*t) == SCHEME_FTP) 
+           opt.follow_ftp = 1;
+         
+         status = retrieve_tree (*t);
+
+         opt.follow_ftp = old_follow_ftp;
+       }
       else
-       status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt);
+       status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt, opt.recursive);
 
       if (opt.delete_after && file_exists_p(filename))
        {
@@ -971,6 +981,13 @@ Can't timestamp and not clobber old files at the same time.\n"));
        logprintf (LOG_NOTQUIET, _("No URLs found in %s.\n"),
                   opt.input_filename);
     }
+
+  /* Print broken links. */
+  if (opt.recursive && opt.spider)
+    {
+      print_broken_links();
+    }
+  
   /* Print the downloaded sum.  */
   if ((opt.recursive || opt.page_requisites
        || nurl > 1