mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Don't ftruncate standard output.
Submitted by Bill Richardson <bill@riverstonenet.com>. Final version of patch published in <9vv1eus668tn7v3vn95e7l2lcjbbph8bi2@farscape.privy.mev.co.uk>.
This commit is contained in:
parent
55f59d0022
commit
043d305fb1
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -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. */
|
||||
|
@ -1508,8 +1508,12 @@ Refusing to truncate existing file `%s'.\n\n"), *hs->local_file);
|
||||
|
||||
#### 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. */
|
||||
|
Loading…
Reference in New Issue
Block a user