From 5eac6071662099f3a1fd3f61c8eaf48a08db2b7a Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 1 Jun 2009 00:13:23 +0000 Subject: [PATCH] fixed configuration of repository path git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6002 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/ConfigBasic.html | 2 +- htroot/ConfigBasic.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/htroot/ConfigBasic.html b/htroot/ConfigBasic.html index 4e6e91d9a..8795295cc 100644 --- a/htroot/ConfigBasic.html +++ b/htroot/ConfigBasic.html @@ -54,7 +54,7 @@ - + diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java index e85b11c77..c22cad8b9 100644 --- a/htroot/ConfigBasic.java +++ b/htroot/ConfigBasic.java @@ -28,6 +28,7 @@ // javac -classpath .:../classes ConfigBasic_p.java // if the shell's current path is HTROOT +import java.io.File; import java.util.regex.Pattern; import de.anomic.data.translator; @@ -170,6 +171,13 @@ public class ConfigBasic { sb.setConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW, false); sb.setConfig(plasmaSwitchboardConstants.INDEX_RECEIVE_ALLOW, false); } + if (post.get("usecase", "").equals("intranet")) { + String repositoryPath = post.get("repositoryPath", "/DATA/HTROOT/repositry"); + File repository = new File(sb.getRootPath(), repositoryPath); + if (repository.exists() && repository.isDirectory()) { + sb.setConfig("repositoryPath", repositoryPath); + } + } } networkName = sb.getConfig(plasmaSwitchboardConstants.NETWORK_NAME, ""); @@ -186,6 +194,7 @@ public class ConfigBasic { prop.put("setUseCase", 0); } prop.put("setUseCase_port", port); + prop.put("setUseCase_repositoryPath", sb.getConfig("repositoryPath", "/DATA/HTROOT/repositry")); // check if values are proper final boolean properPassword = (sb.getConfig(httpd.ADMIN_ACCOUNT_B64MD5, "").length() > 0) || sb.getConfigBool("adminAccountForLocalhost", false);