You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2019/10/15 05:19:49 UTC

[lucene-solr] 01/03: Revert "SOLR-13821: Incorrect file path escape in windows"

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch branch_8_3
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit f18f4bf60972c79ebdf652e9d7136f717c038676
Author: noble <no...@apache.org>
AuthorDate: Tue Oct 15 15:55:12 2019 +1100

    Revert "SOLR-13821: Incorrect file path escape in windows"
    
    This reverts commit 3ce0fc38bb7e34aa57e40216f9e6f3f9528e0ccc.
    
    This feature is not to be included in 8.3 release
---
 solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java b/solr/core/src/java/org/apache/solr/filestore/DistribPackageStore.java
index 4e86926..910f29b 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 {
   @Override
   public Path getRealpath(String path) {
     if (File.separatorChar == '\\') {
-      path = path.replace('/' ,  File.separatorChar);
+      path = path.replaceAll("/", File.separator);
     }
     if (path.charAt(0) != File.separatorChar) {
       path = File.separator + path;
     }
     return new File(this.coreContainer.getResourceLoader().getInstancePath() +
-        File.separator + PackageStoreAPI.PACKAGESTORE_DIRECTORY + path).toPath();
+        "/" + PackageStoreAPI.PACKAGESTORE_DIRECTORY + path).toPath();
   }
 
   class FileInfo {