Apache Lucene open-source search software
SOLR-13821: Incorrect file path escape in windows
noble5e9ed10657e0
diff --git a/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java b/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.javaindex 910f29b5b0c..4e86926150f 100644--- a/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java+++ b/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java@@ -89,13 +89,13 @@ public class DistribPackageStore implements PackageStore {@Overridepublic Path getRealpath(String path) {if (File.separatorChar == '\\') {- path = path.replaceAll("/", File.separator);+ path = path.replace('/' , File.separatorChar);}if (path.charAt(0) != File.separatorChar) {path = File.separator + path;}return new File(this.coreContainer.getResourceLoader().getInstancePath() +- "/" + PackageStoreAPI.PACKAGESTORE_DIRECTORY + path).toPath();+ File.separator + PackageStoreAPI.PACKAGESTORE_DIRECTORY + path).toPath();}class FileInfo {