Here is a patch for the recursion problem:
http://www.nabble.com/file/3916/FtpPollingEndpoint.patch
FtpPollingEndpoint.patch
Here is the changed method:
protected void pollFileOrDirectory(FTPClient ftp, String
fileOrDirectory, boolean processDir) throws Exception {
FTPFile[] files = ftp.listFiles(fileOrDirectory);
for (int i = 0; i < files.length; i++) {
String file = fileOrDirectory + "/" + files[i].getName();
if (!files[i].isDirectory()) {
File f = new File(file);
String name = f.getName();
if (name.equals(".") || name.equals("..")) {
continue; // ignore "." and ".."
}
if (getFilter() == null || getFilter().accept(f)) {
pollFile(file); // process the file
}
} else if (processDir) {
logger.debug("Polling directory " + file);
pollFileOrDirectory(ftp, file, isRecursive());
} else {
logger.debug("Skipping directory " + file);
}
}
}
--
View this message in context:
http://www.nabble.com/servicemix-ftp%3A-FtpPollingEndpoint--tf2540539.html#a7082814
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.