mirror of https://github.com/apache/lucene.git
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:
parent
489a87af9c
commit
67ad122d9b
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue