mlbiscoc commented on code in PR #2924: URL: https://github.com/apache/solr/pull/2924#discussion_r1943703861
########## solr/core/src/java/org/apache/solr/filestore/DistribFileStore.java: ########## @@ -80,19 +80,21 @@ public DistribFileStore(CoreContainer coreContainer) { } @Override - public Path getRealpath(String path) { + public Path getRealPath(String path) { return _getRealPath(path, solrHome); } - private static Path _getRealPath(String path, Path solrHome) { - if (File.separatorChar == '\\') { - path = path.replace('/', File.separatorChar); - } - SolrPaths.assertNotUnc(Path.of(path)); - while (path.startsWith(File.separator)) { // Trim all leading slashes - path = path.substring(1); + private static Path _getRealPath(String dir, Path solrHome) { + Path path = Path.of(dir); + SolrPaths.assertNotUnc(path); + + if (path.isAbsolute()) { + // Strip the path of from being absolute to become relative to resolve with SolrHome + path = path.subpath(0, path.getNameCount()); } Review Comment: [PR](https://github.com/apache/solr/pull/3160) to bring back that old logic. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org