goftp icon indicating copy to clipboard operation
goftp copied to clipboard

walk does not work on certain server

Open VincenzoLaSpesa opened this issue 9 years ago • 5 comments

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

VincenzoLaSpesa avatar May 26 '15 10:05 VincenzoLaSpesa

This issue can be closed because of PR #4 right?

nl5887 avatar May 29 '15 09:05 nl5887

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)

VincenzoLaSpesa avatar May 29 '15 12:05 VincenzoLaSpesa

Anyone still working on this? If not, I'm about to tackle it.

jangler avatar Aug 30 '15 06:08 jangler

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

VincenzoLaSpesa avatar Aug 30 '15 09:08 VincenzoLaSpesa

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.

nl5887 avatar Aug 31 '15 11:08 nl5887