fixed problem with default path after first start-up

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2440 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 18 years ago
parent 57d50df858
commit d78b824e85

@ -52,6 +52,7 @@ import java.lang.reflect.Method;
import de.anomic.data.translator;
import de.anomic.http.httpHeader;
import de.anomic.http.httpdFileHandler;
import de.anomic.kelondro.kelondroBase64Order;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverCodings;
@ -198,7 +199,8 @@ public class ConfigBasic {
boolean properPort = (yacyCore.seedDB.mySeed.isSenior()) || (yacyCore.seedDB.mySeed.isPrincipal());
if ((properPW) && (env.getConfig("defaultFiles", "").startsWith("ConfigBasic.html,"))) {
env.setConfig("defaultFiles", env.getConfig("defaultFiles", "").substring(17));
env.setConfig("defaultFiles", env.getConfig("defaultFiles", "").substring(17));
httpdFileHandler.initDefaultPath();
}
prop.put("statusName", (properName) ? 1 : 0);

@ -180,8 +180,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
}
// create default files array
defaultFiles = switchboard.getConfig("defaultFiles","index.html").split(",");
if (defaultFiles.length == 0) defaultFiles = new String[] {"index.html"};
initDefaultPath();
// create a htRootPath: system pages
if (htRootPath == null) {
@ -217,6 +216,12 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
}
}
public static final void initDefaultPath() {
// create default files array
defaultFiles = switchboard.getConfig("defaultFiles","index.html").split(",");
if (defaultFiles.length == 0) defaultFiles = new String[] {"index.html"};
}
/*
* Returns the path of a (existing) localized File, or the english one, if not availible.
* @param path is relative from htroot

Loading…
Cancel
Save