mirror of https://github.com/apache/lucene.git
SOLR-1213 SolrResourceLoader.normalizeDir() should add OS specific file separator
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@783290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b14338ee41
commit
9f0616bdc8
|
@ -43,7 +43,7 @@ public class CoreDescriptor {
|
|||
if (instanceDir == null) {
|
||||
throw new NullPointerException("Missing required \'instanceDir\'");
|
||||
}
|
||||
if (!instanceDir.endsWith("/")) instanceDir = instanceDir + "/";
|
||||
instanceDir = SolrResourceLoader.normalizeDir(instanceDir);
|
||||
this.instanceDir = instanceDir;
|
||||
this.configName = getDefaultConfigName();
|
||||
this.schemaName = getDefaultSchemaName();
|
||||
|
|
|
@ -134,7 +134,7 @@ public class SolrResourceLoader implements ResourceLoader
|
|||
|
||||
/** Ensures a directory name always ends with a '/'. */
|
||||
public static String normalizeDir(String path) {
|
||||
return ( path != null && (!(path.endsWith("/") || path.endsWith("\\"))) )? path + '/' : path;
|
||||
return ( path != null && (!(path.endsWith("/") || path.endsWith("\\"))) )? path + File.separator : path;
|
||||
}
|
||||
|
||||
public String getConfigDir() {
|
||||
|
|
Loading…
Reference in New Issue