wget: --no-cache option (noop) wanted

Denys Vlasenko vda.linux at googlemail.com
Sun Jun 17 17:53:51 UTC 2012


On Wednesday 13 June 2012 17:48, Rich Felker wrote:
> > Proposed fix:
> > 
> > [...]
> > +static void reset_beg_range_to_zero(void)
> > +{
> > +	//bb_error_msg("restart failed");
> > +	G.beg_range = 0;
> > +	xlseek(G.output_fd, 0, SEEK_SET);
> > +	ftruncate(G.output_fd, 0);
> 
> This behavior is highly undesirable; if for example you have 99% of a
> 1gb file downloaded, this will truncate it (against the user's wishes
> and expectation). It would be much nicer to just start overwriting in
> place so that the original is not lost (assuming the contents are the
> same).

Done:

commit 6144124aac1d4a30ff81842ba1bb0e28373a71c8
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Sun Jun 17 19:52:25 2012 +0200

    wget: make -c _not_ truncate the file

-- 
vda


More information about the busybox mailing list