Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145296 - net-misc/wget forgets working directory after timeout/reconnect
Summary: net-misc/wget forgets working directory after timeout/reconnect
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-27 17:35 UTC by Chris Harrington
Modified: 2008-01-28 14:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Example Output (wget_output.txt,1.80 KB, text/plain)
2006-08-27 19:14 UTC, Chris Harrington
Details
patch to eliminate issue (ftp.c.patch,323 bytes, patch)
2006-08-27 19:18 UTC, Chris Harrington
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Harrington 2006-08-27 17:35:43 UTC
Using `wget -r` to mirror an FTP site. This box has a fairly flakey broadband connection, and will occasionally stall the connection on the LIST command. wget times out, succeeds reconnecting, but does not do a CWD command after reconnect. wget proceeds to download the root directory of the ftp site and treats the files within as if they were in the subdirectory it was in when disconnected.

Example:
$ wget -rN ftp://ftp.example.com/files/
(wget decends into files/, starts downloading)
(wget stalls)
(wget disconnects, reconnects)
(wget downloads files under ftp://ftp.example.com/ instead of ftp://ftp.example.com/files/)
$ rm -rf ftp.example.com/

I'm willing to take a look at the issue and try making a patch. I've never submitted a patch to an application before, could someone give me a pointer? (diff flags, where to submit, etc)
Comment 1 Chris Harrington 2006-08-27 17:37:40 UTC
Oh, just to carify, the files it downloads from the root dir are stored in the subdirectories, not the root, effectively screwing up everything.
Comment 2 Chris Harrington 2006-08-27 19:14:08 UTC
Created attachment 95236 [details]
Example Output

See attached output. Note the "CWD not required".
Comment 3 Chris Harrington 2006-08-27 19:18:40 UTC
Created attachment 95237 [details, diff]
patch to eliminate issue

This is sort of a hack, clearly disabling code that was put there for some good reason. Solves the problem, though. In all likelyhood, the only side effect would be additional unneeded CWD commands.
Comment 4 Chris Harrington 2006-08-29 10:53:51 UTC
Sorry for attaching to the wrong component. Still new to this. :)
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2006-10-11 13:41:01 UTC
Spanky, would you like this?
Comment 6 SpanKY gentoo-dev 2008-01-28 14:03:54 UTC
please retest with wget-1.11 and if it still fails, re-open with the new output