Weird - why is the MS FTP server returning Unix format dirs?
Just to confirm, can you log in on the command line and type
quote SYST
If it returns Windows_NT that is why the Windows parser is being used. It seems that SYST is not as reliable as we'd hoped for determining the dir listing format.
There is not currently a way to force use of the UnixFileParser, although this sounds like a useful feature. We will also reconsider use of SYST and perhaps try to detect the listing format another way.
If you want things to work right now, the best thing is to edit FTPFileFactory.java and in the constructor, replace
setParser(system);
with
parser = new UnixFileParser();
This will force use of the unix parser in all cases - please let us know if this works for this particular FTP server.
We have a case where we are connecting to a Windows machine, but the directory listing comes back in a Unix format. This is causing date parsing problems.
.....
Is there any way to override the selection of the FileParser to explicitly choose UnixFileParser over WindowsFileParser?
Thanks.