wget2 icon indicating copy to clipboard operation
wget2 copied to clipboard

"The file is already fully retrieved; nothing to do." --> End process and do not retry further.

Open WolfgangDpunkt opened this issue 3 years ago • 2 comments

Is there a way to restrict the retry function so that if the error message is "The file is already fully retrieved; nothing to do.", wget2 then recognizes this not as an fail of the download but a success message and quits the process accordingly?

I use Wget2 1.99.1 with the following arguments: wget2 -limit-rate=29000k --random-wait --chunk-size=1M --max-threads=18 -r -nc -c --retry-connrefused --tries=50 --timeout=95 --no-parent -l 200 -e robots=off -R "index.html*" -nd --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0)" https://bigfile.com/big.iso

In the following scenario the behavior is undesirable for me: I let slow downloads run unattended in the background (via tmux) . The file big.iso is then eventually ready (I can see that from the file size and timestamp), so I copy it from my download folder to the destination. But now wget2 very dutifully starts the download again, because now the way is clear for a successful retry.

It would be desirable, however, that when wget2 detects the complete presence of a file, it then also completes the process successfully and terminates itself automatically. Having to do this manually is a bit cumbersome.

But I don't want to do without the "--retry-connrefused" function either, because if my internet connection is disconnected, the download should be resumed automatically.

If this option does not actually exist, it would be a helpful feature for the reasons described.

Thank you very much for any hints on how to solve this.

WolfgangDpunkt avatar Jan 07 '22 15:01 WolfgangDpunkt

I could just reproduce, it is the combination of -c and --chunk-size, e.g. I see the same issue with

wget2 --chunk-size=1M -c https://ftp.gnu.org/gnu/libunistring/libunistring-0.9.5.tar.xz

but not with just one of the two options.

I'll hunt this further down in the next days.

If possible, try to use wget2 2.0.0. We soon will make the bug fix version 2.0.1. And then ping the Debian maintainers to update the packaging (this will go into Ubuntu as well after a while).

rockdaboot avatar Jan 08 '22 18:01 rockdaboot

Thank you very much for this friendly and profound answer. I look forward to using the current two-point zero version if it will be available for Debian. I wish you a wonderful Sunday.

WolfgangDpunkt avatar Jan 09 '22 12:01 WolfgangDpunkt