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

Gary D. Gregory commented on IO-611:
------------------------------------

Hi [~urvanov] 

You must use GitHub to create a pull request: 
https://github.com/apache/commons-io

> FilenameUtils.normalize does not sanitize multiple slashes after prefix
> -----------------------------------------------------------------------
>
>                 Key: IO-611
>                 URL: https://issues.apache.org/jira/browse/IO-611
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.6
>            Reporter: Urvanov
>            Priority: Major
>
> FilenameUtils.#normalize states in javadoc that //foo//./bar becomes /foo/bar
> {code:java}
> System.out.println(FilenameUtils.normalize("//foo//./bar"));
> System.out.println(FilenameUtils.normalize("\\\\foo\\\\.\\bar"));
> {code}
> Result:
> {code:java}
> //foo//bar
> //foo//bar
> {code}
> So, javadoc says, that it should be /foo/bar. I think, that //foo is prefix, 
> so it should be //foo/bar. But in real life it becomes the third way 
> (//foo//bar).
>  
> I think we should fix javadoc and the code. The correct result should be 
> //foo/bar



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to