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

Ivan Mitic commented on HADOOP-8868:
------------------------------------

Thanks Bikas for the review.

bq. So we are using JAVA API to resolve the path to a normalized form? Ideally 
the FileUtil method could take File arguments instead of strings but we'd like 
to avoid changing the public API.
Right. Having File APIs would be great (as Java polishes this up nicely), 
however, for compat reasons this makes more sense.

bq. In what cases can we get a mix of slashes on the string path?
In one case, a path with only forward slashes was sent to winutils. The path 
was longer to MAX_PATH (260 chars) so it was prepended with  "\\?\" to tell the 
OS that the path is longer than 260. In this scenario we had both forward and 
backward slashes. Now, it makes more sense to do the slash conversion in Java 
then in winutils, given that Java provides better/tested cross-platform 
support. Make sense?
                
> FileUtil#chmod should normalize the path before calling into shell APIs
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-8868
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8868
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 1-win
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>         Attachments: HADOOP-8868.branch-1-win.chmod.patch
>
>
> We have seen cases where paths passed in from FileUtil#chmod to Shell APIs 
> can contain both forward and backward slashes on Windows.
> This causes problems, since some Windows APIs do not work well with mixed 
> slashes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to