Bugzilla – Bug 144410
wget fails to change working directory when retrying download
Last modified: 2006-02-03 10:02:17 UTC
It seems to me that the wget tool (wget 1.10.2) forgets to change the working directory when a file download fails and it is retrying the connection (i.e. it attempts to load the file from the root of the remote server, regardless of where it originally was). Please find the attached snippet from the output log where this happened.
Created attachment 64308 [details] Part of the wget log showing the mistake.
Note: This looks like a fairly recent bug, probably it sneaked in between 1.10.1 to 1.10.2, as I use wget extensively in a script used for testing new releases and the failure only occurred in SLES10 Beta1.
The bug must have been in 1.10.1 already, as no FTP code was changed for 1.10.2.
The bug was introduced in version 1.10, but this code is so obscure that I am not sure if the fix I found doesn't break anything else :(
Argggh - fixing the CWD problem still doesn't fix the restart of broken FTP transfers, because (unless the -c switch is given) the transfer is restarted at the end (!) position of the file rather than the position at which the transfer failed.
OK, I just submitted a hack that fixes these problems and hopefully doesn't create any others. Please test intensively!
Created attachment 66073 [details] Patch to fix the restart of interrupted FTP transactions I am attaching the patch I created, so that I can point the authors of wget to this bug report when I report it upstream.
Thank you for the patch. Intensive testing is no problem - my scripts download lots of data on every install :-)