SOLR-4699: The System admin handler should not assume a file system based data directory location.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1466649 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-04-10 19:52:33 +00:00
parent 7e257c79fc
commit f9d36d9fda
2 changed files with 8 additions and 1 deletions

View File

@ -175,6 +175,8 @@ Bug Fixes
* SOLR-4581: When faceting on numeric fields in Solr 4.2, negative values (constraints)
were sorted incorrectly. (Alexander Buhr, shalin, yonik)
* SOLR-4699: The System admin handler should not assume a file system based data directory
location. (Mark Miller)
Optimizations
----------------------

View File

@ -106,7 +106,12 @@ public class SystemInfoHandler extends RequestHandlerBase
SimpleOrderedMap<Object> dirs = new SimpleOrderedMap<Object>();
dirs.add( "cwd" , new File( System.getProperty("user.dir")).getAbsolutePath() );
dirs.add( "instance", new File( core.getResourceLoader().getInstanceDir() ).getAbsolutePath() );
dirs.add( "data", new File( core.getDataDir() ).getAbsolutePath() );
try {
dirs.add( "data", core.getDirectoryFactory().normalize(core.getDataDir()));
} catch (IOException e) {
log.warn("Problem getting the normalized data directory path", e);
dirs.add( "data", "N/A" );
}
dirs.add( "dirimpl", core.getDirectoryFactory().getClass().getName());
try {
dirs.add( "index", core.getDirectoryFactory().normalize(core.getIndexDir()) );