- fix for last commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3424 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
karlchenofhell 2007-03-02 01:50:21 +00:00
parent 88245e44d8
commit 93e1ad2bca
2 changed files with 11 additions and 8 deletions

View File

@ -32,12 +32,12 @@ public class robots {
if (rbc.isLockedDisallowed() || rbc.isDirsDisallowed()) {
final ArrayList[] p = getFiles(env.getConfig(plasmaSwitchboard.HTROOT_PATH, plasmaSwitchboard.HTROOT_PATH_DEFAULT));
if (rbc.isLockedDisallowed()) {
prop.put(httpdRobotsTxtConfig.LOCKED, p[0].size());
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.LOCKED, p[0].size());
for (int i=0; i<p[0].size(); i++)
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.LOCKED + "_" + i + "_page", p[0].get(i));
}
if (rbc.isDirsDisallowed()) {
prop.put(httpdRobotsTxtConfig.DIRS, p[1].size());
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.DIRS, p[1].size());
for (int i=0; i<p[1].size(); i++)
prop.put(httpdRobotsTxtConfig.ALL + "_" + httpdRobotsTxtConfig.DIRS + "_" + i + "_dir", p[1].get(i));
}
@ -58,12 +58,12 @@ public class robots {
if (htroots[i].equals("www")) continue;
file = new File(htroot, htroots[i]);
if (file.isDirectory()) {
htrootDirs.add("/" + file.getName());
htrootDirs.add(htroots[i]);
} else if (
(dot = htroots[i].lastIndexOf('.')) < 2 ||
htroots[i].charAt(dot - 2) == '_' && htroots[i].charAt(dot - 1) == 'p'
) {
htrootFiles.add("/" + file.getName());
htrootFiles.add(htroots[i]);
}
}
return new ArrayList[] { htrootFiles, htrootDirs };

View File

@ -4,13 +4,16 @@ User-agent: *
#(all)#
#{dirs}#
# dirs
Disallow: /#[dir]##{/dirs}#
#{dirs}#
Disallow: /#[dir]#
#{/dirs}#
#{locked}#
# locked
Disallow: /#[page]##{/locked}#
#{locked}#
Disallow: /#[page]#
#{/locked}#
#(wiki)#::
# wiki