Hello,
Using Version 1.4.4, I am trying to call dirDetails() on a SunOS 5.8 server, and at first I was getting the following:
java.text.ParseException: Unexpected number of fields: 2
at com.enterprisedt.net.ftp.WindowsFileParser.parse WindowsFileParser.java:87)
at com.enterprisedt.net.ftp.FTPFileFactory.parse(FTPFileFactory.java:169)
at com.enterprisedt.net.ftp.FTPClient.dirDetails(FTPClient.java:1735)
I found "WindowsFileParser" strange because my FTP-server is a Unix machine, so I overwrote the parser:
setFTPFileFactory(new FTPFileFactory(new UnixFileParser()));
Now I am getting:
java.text.ParseException: Unexpected number of fields in listing 'Gesamt 8' - expected minimum 8 fields but found 2 fields
OK, now we are getting somewhere.  When I do dir(".", true), I get:
Gesamt 8
drwxrwxr-x   4 nbctrl   notebook     512 Sep 16 10:55 .
drwxrwx---   9 nbctrl   notebook     512 Sep 16 11:27 ..
drwxrwxr-x   3 nbctrl   notebook     512 Sep 16 10:56 dir11
drwxrwxr-x   2 nbctrl   notebook     512 Sep 16 10:57 dir12
-rw-rw-r--   1 nbctrl   notebook      16 Sep 16 10:54 file1.txt
It seems, both parsers are not able to deal with "Gesamt 8", which is German for "total 8".  Your parsers probably skip any line that starts with "total", but in my case the word is not "total".
How can I overwrite this behavior?  I could write a whole new parser, but I don't want to implement functionality that you already have.  Is there a way to overwrite a method on UnixFileParser ?  I do not have the source code...
Thank you very much for any help,
Bojidar