+2002-05-14 Bill Richardson <bill@riverstonenet.com>
+
+ * ftp.c (getftp): Don't ftruncate stdout.
+
+ * http.c (gethttp): Don't ftruncate stdout.
+
2002-05-09 Ian Abbott <abbotti@mev.co.uk>
* cmpt.c (strptime_internal): Synched with glibc-2.1.3.
/* 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. */
#### A possible solution to this would be to remember the
file position in the output document and to seek to that
- position, instead of rewinding. */
- if (!hs->restval && global_download_count == 0)
+ position, instead of rewinding.
+
+ We don't truncate stdout, since that breaks
+ "wget -O - [...] >> foo".
+ */
+ if (!hs->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. */