You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ry...@apache.org on 2008/10/07 18:13:06 UTC

svn commit: r702528 - /lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java

Author: ryan
Date: Tue Oct  7 09:13:02 2008
New Revision: 702528

URL: http://svn.apache.org/viewvc?rev=702528&view=rev
Log:
make sure the directory exists before listing files  (this could only happen if instanceDir is invalid)

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java?rev=702528&r1=702527&r2=702528&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrCore.java Tue Oct  7 09:13:02 2008
@@ -1440,8 +1440,10 @@
         // Hide everything...
         Set<String> hide = new HashSet<String>();
         File configdir = new File( solrConfig.getResourceLoader().getConfigDir() ); 
-        for( String file : configdir.list() ) {
-          hide.add( file.toUpperCase() );
+        if( configdir.exists() && configdir.isDirectory() ) {
+          for( String file : configdir.list() ) {
+            hide.add( file.toUpperCase() );
+          }
         }
         
         // except the "gettable" list