fix for endless loop in FTP crawling, see http://bugs.yacy.net/view.php?id=32

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7736 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent d1dbbd956a
commit 98c4d25185

@ -2568,6 +2568,7 @@ public class FTPClient {
}
// then find all directories and add them recursively
for (final String line : list) {
//System.out.println("LIST:" + line);
info = parseListData(line);
if (info != null && !info.name.endsWith(".") && !info.name.startsWith(".")) {
if (info.type == filetype.directory) {
@ -2575,10 +2576,12 @@ public class FTPClient {
}
if (info.type == filetype.link) {
int q = info.name.indexOf("->");
if (q >= 0) {
if (q >= 0 && info.name.indexOf("..", q) < 0) {
//System.out.println("*** LINK:" + line);
info.name = info.name.substring(0, q).trim();
sitelist(ftpClient, path + info.name, queue);
}
}
}
}

Loading…
Cancel
Save