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

Tsz Wo (Nicholas), SZE commented on HADOOP-4815:
------------------------------------------------

There is a similar problem in HDFS: we are fixing it by calling 
java.util.regex.Pattern.quote(srcPath) before passing it to 
String.replaceFirst(..).  This solution properly works here.

> S3FileSystem.renameRecursive(..) does not work correctly if src contains Java 
> regular expression special characters
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-4815
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4815
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: fs
>            Reporter: Tsz Wo (Nicholas), SZE
>
> In S3FileSystem, the variable srcPath is not supposed to be a regular 
> expression but is used as a regular expression in the line below.
> {code}
>         Path newDst = new Path(oldSrcPath.replaceFirst(srcPath, dstPath));
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to