goftp
goftp copied to clipboard
walk does not work on certain server
The walk function works correctly on server with standard behaviour. for example ftp://bo.mirror.garr.it/ It outputs line formatted like this
modify=20081125111318;perm=adfr;size=24;type=OS.unix=symlink;unique=FE0BU200059DA;UNIX.group=0;UNIX.mode=0777;UNIX.owner=0; linux
But certain servers ( like ftp://ftp.packardbell.com/ ) produces output like this:
-rw-r--r-- 1 aokur (?) 17 Jan 5 2010 fcheck.js
Looking at func (ftp *FTP) List(path string) I see that you first try to use MLSD and if it don't work fall back to LIST
There are some other command that produce output more parsable than LIST.
like NLST or EPLF
This issue can be closed because of PR #4 right?
Not yet. I'll have to write a parser for NLST and EPLF in order to cover more type of server.
(I forgot to add a test case for "walk", it works only on goodServer)
Anyone still working on this? If not, I'm about to tackle it.
I'm on it. My fork works. I'll have to write a couple of test cases, update docs, and arrange a pull request. https://github.com/VincenzoLaSpesa/goftp
That would be great @VincenzoLaSpesa. Currently don't have a lot of time, but will spend some time next weeks to improve quality and tests also.