SOLR-1041 -- Fix issue with absolute instanceDir

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@798482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2009-07-28 10:46:36 +00:00
parent 489a87af9c
commit 67ad122d9b
1 changed files with 3 additions and 2 deletions

View File

@ -80,11 +80,12 @@ public class CoreDescriptor {
/**@return the default data directory. */ /**@return the default data directory. */
public String getDefaultDataDir() { public String getDefaultDataDir() {
return coreContainer.loader.getInstanceDir() + SolrResourceLoader.normalizeDir(instanceDir) + "data"+File.separator; return "data" + File.separator;
} }
public String getDataDir() { public String getDataDir() {
if (dataDir == null) return getDefaultDataDir(); String dataDir = this.dataDir;
if (dataDir == null) dataDir = getDefaultDataDir();
if (new File(dataDir).isAbsolute()) { if (new File(dataDir).isAbsolute()) {
return dataDir; return dataDir;
} else { } else {