Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for absolute paths for repository path

orbiter3ea399ec915c
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java
index a168ed3e9..f936c2501 100644
--- a/htroot/ConfigBasic.java
+++ b/htroot/ConfigBasic.java
@@ -173,7 +173,7 @@ public class ConfigBasic {
}
if (post.get("usecase", "").equals("intranet")) {
String repositoryPath = post.get("repositoryPath", "/DATA/HTROOT/repository");
- File repository = new File(sb.getRootPath(), repositoryPath);
+ File repository = (repositoryPath.startsWith("/") || repositoryPath.charAt(1) == ':') ? new File(repositoryPath) : new File(sb.getRootPath(), repositoryPath);
if (repository.exists() && repository.isDirectory()) {
sb.setConfig("repositoryPath", repositoryPath);
}