Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixed problem with default path after first start-up
orbiterd78b824e8572
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.javaindex cf0ca5084..0657309ff 100644--- a/htroot/ConfigBasic.java+++ b/htroot/ConfigBasic.java@@ -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);diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.javaindex 4452a3b8f..28c612602 100644--- a/source/de/anomic/http/httpdFileHandler.java+++ b/source/de/anomic/http/httpdFileHandler.java@@ -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 pagesif (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