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)
Oh, just to carify, the files it downloads from the root dir are stored in the subdirectories, not the root, effectively screwing up everything.
Created attachment 95236 [details] Example Output See attached output. Note the "CWD not required".
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.
Sorry for attaching to the wrong component. Still new to this. :)
Spanky, would you like this?
please retest with wget-1.11 and if it still fails, re-open with the new output