Henrik Sorensen schreef:
Hi List,
Before starting to send patches, I would like some feedback on some of the
changes I have had to do inorder to correctly to receive files and
directories from a MVS server.
A number of these changes could be added independently of the actual type of
server being used.
the two functions
isFunctioningAsFile
and
isFunctioningAsDirectory
is not taking into account that the file type can be unknown, so a check is
added:
private boolean isFunctioningAsDirectory(FTPClient ftp, String dir, FTPFile
file) {
boolean result = false;
String currentWorkingDir = null;
if (file.isDirectory()) {
return true;
} else if (file.isFile()) {
return false;
} else if (file.isUnknown()) {
return false;
}
...
}
private boolean isFunctioningAsFile(FTPClient ftp, String dir, FTPFile
file) {
if (file.isDirectory()) {
return false;
} else if (file.isFile()) {
return true;
} else if (file.isUnknown()) {
return false;
}
return !isFunctioningAsDirectory(ftp, dir, file);
}
I am aware of different mailing lists have different ways of dealing with
discussions, but I intend to send a number of similar mails, for other
possible bugs in the FTP.java code, so please inform me if you would rather
prefer this to be done differently.
Henrik
Please use bugzilla to report (possible) bugs and code enhancements.
Please see
http://ant.apache.org/bugs.html
Martijn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]