Bug 144410 - wget fails to change working directory when retrying download
Summary: wget fails to change working directory when retrying download
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Network (show other bugs)
Version: Beta 1
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Reinhard Max
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-20 15:49 UTC by Jiri Dluhos
Modified: 2006-02-03 10:02 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Part of the wget log showing the mistake. (1.59 KB, text/plain)
2006-01-20 15:50 UTC, Jiri Dluhos
Details
Patch to fix the restart of interrupted FTP transactions (479 bytes, patch)
2006-02-01 18:38 UTC, Reinhard Max
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Dluhos 2006-01-20 15:49:46 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.
Comment 1 Jiri Dluhos 2006-01-20 15:50:37 UTC
Created attachment 64308 [details]
Part of the wget log showing the mistake.
Comment 2 Jiri Dluhos 2006-01-20 15:54:02 UTC
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.
Comment 3 Reinhard Max 2006-02-01 13:29:31 UTC
The bug must have been in 1.10.1 already, as no FTP code was changed for 1.10.2.
Comment 4 Reinhard Max 2006-02-01 15:50:33 UTC
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 :(
Comment 5 Reinhard Max 2006-02-01 16:03:32 UTC
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.
Comment 6 Reinhard Max 2006-02-01 18:35:35 UTC
OK, I just submitted a hack that fixes these problems and hopefully doesn't create any others.

Please test intensively!
Comment 7 Reinhard Max 2006-02-01 18:38:42 UTC
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.
Comment 8 Jiri Dluhos 2006-02-03 10:02:17 UTC
Thank you for the patch. Intensive testing is no problem - my scripts download lots of data on every install :-)