]> sjero.net Git - wget/blobdiff - src/main.c
[svn] Fix -O timestamp bug.
[wget] / src / main.c
index 1af9ba1bb9f16abd473f64027c4646970aac6356..221ac5ae3d93824a0407d9112ca0c4f9053a8a24 100644 (file)
@@ -162,7 +162,7 @@ Download:\n\
        --spider                 don\'t download anything.\n\
   -T,  --timeout=SECONDS        set the read timeout to SECONDS.\n\
   -w,  --wait=SECONDS           wait SECONDS between retrievals.\n\
-       --waitretry=SECONDS     wait 1...SECONDS between retries of a retrieval.\n\
+       --waitretry=SECONDS      wait 1...SECONDS between retries of a retrieval.\n\
   -Y,  --proxy=on/off           turn proxy on or off.\n\
   -Q,  --quota=NUMBER           set retrieval quota to NUMBER.\n\
 \n"),  _("\
@@ -726,12 +726,15 @@ Can't timestamp and not clobber old files at the same time.\n"));
        opt.dfp = stdout;
       else
        {
+         struct stat st;
          opt.dfp = fopen (opt.output_document, "wb");
          if (opt.dfp == NULL)
            {
              perror (opt.output_document);
              exit (1);
            }
+         if (fstat (fileno (opt.dfp), &st) == 0 && S_ISREG (st.st_mode))
+           opt.od_known_regular = 1;
        }
     }
 
@@ -809,6 +812,9 @@ Can't timestamp and not clobber old files at the same time.\n"));
     }
   log_close ();
   cleanup ();
+#ifdef DEBUG_MALLOC
+  print_malloc_debug_stats ();
+#endif
   if (status == RETROK)
     return 0;
   else