]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Don't ftruncate standard output.
[wget] / src / ftp.c
index ebddf3a06fbfaaf9d8890fbd459452b2ea209bcc..c63ef827c4917a7c7f7defcd0f38ec0193840e9d 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -861,7 +861,7 @@ Error in server response, closing control connection.\n"));
       /* Rewind the output document if the download starts over and if
         this is the first download.  See gethttp() for a longer
         explanation.  */
-      if (!restval && global_download_count == 0)
+      if (!restval && global_download_count == 0 && opt.dfp != stdout)
        {
          /* This will silently fail for streams that don't correspond
             to regular files, but that's OK.  */