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:
Noble Paul 2009-06-10 11:09:05 +00:00
parent b14338ee41
commit 9f0616bdc8
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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() {