lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject svn commit: r1725196 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/core/CorePropertiesLocator.java
Date Mon, 18 Jan 2016 09:05:24 GMT
Author: romseygeek
Date: Mon Jan 18 09:05:24 2016
New Revision: 1725196

URL: http://svn.apache.org/viewvc?rev=1725196&view=rev
Log:
SOLR-8548: Core Discovery was not following symlinks

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1725196&r1=1725195&r2=1725196&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Mon Jan 18 09:05:24 2016
@@ -399,6 +399,9 @@ Bug Fixes
 * SOLR-8541: Highlighting a geo RPT field would throw an NPE instead of doing nothing.
   (Pawel Rog via David Smiley)
 
+* SOLR-8548: Core discovery was not following symlinks (Aaron LaBella via Alan
+  Woodward)
+
 Optimizations
 ----------------------
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java?rev=1725196&r1=1725195&r2=1725196&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java Mon
Jan 18 09:05:24 2016
@@ -24,15 +24,18 @@ import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.lang.invoke.MethodHandles;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.FileVisitOption;
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.SimpleFileVisitor;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 
 import com.google.common.collect.Lists;
 import org.apache.solr.common.SolrException;
@@ -123,7 +126,10 @@ public class CorePropertiesLocator imple
     logger.info("Looking for core definitions underneath {}", rootDirectory);
     final List<CoreDescriptor> cds = Lists.newArrayList();
     try {
-      Files.walkFileTree(this.rootDirectory, new SimpleFileVisitor<Path>() {
+      Set<FileVisitOption> options = new HashSet<>();
+      options.add(FileVisitOption.FOLLOW_LINKS);
+      final int maxDepth = 256;
+      Files.walkFileTree(this.rootDirectory, options, maxDepth, new SimpleFileVisitor<Path>()
{
         @Override
         public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
{
           if (file.getFileName().toString().equals(PROPERTIES_FILENAME)) {



Mime
View raw message