[ 
https://issues.apache.org/jira/browse/SOLR-10387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15948212#comment-15948212
 ] 

Erick Erickson commented on SOLR-10387:
---------------------------------------

Too funny! We both did he _exact_ same solution in the normalizeDest method, 
clear to naming the variables identically and passing in srcIsZk and dstIsZk as 
booleans.

I was looking at the code in detail though, and I believe your patch doesn't 
handle the case of copying a single file from ZK to a local directory. This is 
the _last_ section in the method, the patch I just put up has this comment just 
above the code in question:

// Single file ZK -> local copy where ZK is a leaf node
The test there is still 
if (dst.endsWith("/") == false) dst += "/";

give me a minute to incorporate your test changes though.


> zkTransfer normalizes destination path incorrectly if source is a windows 
> directory 
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-10387
>                 URL: https://issues.apache.org/jira/browse/SOLR-10387
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: gopikannan venugopalsamy
>            Assignee: Erick Erickson
>         Attachments: SOLR-10387.patch, SOLR-10387.patch, SOLR-10387.patch
>
>
> While normalizing dest it is looking only for '/' in source path but this 
> will not work for windows style delimiter.
> /lucene-solr/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
>   private static String normalizeDest(String srcName, String dstName) {
>     if (dstName.endsWith("/")) { // Dest is a directory.
>       int pos = srcName.lastIndexOf("/");
>       if (pos < 0) {



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to