Apache Solr open-source search software
SOLR Revert change in path separator exposed by cat() Previous change *should* have been purely a refactor but accidentally changed the path separator this streaming expression exposed to always be '/'. Apparently this is controversial so the previous behavior is re-instated here (and fixes a failing test on Windows).
David Smiley80bc86dd6a72
diff --git a/solr/core/src/java/org/apache/solr/handler/CatStream.java b/solr/core/src/java/org/apache/solr/handler/CatStream.javaindex 0f11fdf8133..d7f5fe67c49 100644--- a/solr/core/src/java/org/apache/solr/handler/CatStream.java+++ b/solr/core/src/java/org/apache/solr/handler/CatStream.java@@ -224,7 +224,9 @@ public class CatStream extends TupleStream implements Expressible {} else if (Files.isDirectory(entry)) {try (Stream<Path> directoryContents = Files.list(entry)) {directoryContents.sorted().forEach(iPath -> {- final String itemDisplayPath = seed.displayPath + "/" + iPath.getFileName();+ // debatable: should the separator be OS/file-system specific, or perhaps always "/" ?+ final String displayPathSeparator = iPath.getFileSystem().getSeparator();+ final String itemDisplayPath = seed.displayPath + displayPathSeparator + iPath.getFileName();findReadableFiles(new CrawlFile(itemDisplayPath, iPath), foundFiles);});} catch (IOException e) {