You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Adam McClenaghan (JIRA)" <ji...@apache.org> on 2018/10/03 13:20:00 UTC
[jira] [Updated] (IO-585) FilenameUtils#normalizeNoEndSeparator
does not sanitize multiple backslashes directly after the colon in windows
file paths
[ https://issues.apache.org/jira/browse/IO-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam McClenaghan updated IO-585:
--------------------------------
Description:
FilenameUtils#normalizeNoEndSeparator states in the javadoc that :
"A double slash will be merged to a single slash (but UNC names are handled)."
It has been observed that if a double backslash occurs after the colon in a windows filepath, then the returned path still contains this double backslash. For example:
{code:java}
C:\\Program Files\\ExampleDirectory --> C:\\Program Files\ExampleDirectory {code}
While the expectation is that we should be returning ' C:\Program Files\ExampleDirectory '
was:
FilenameUtils#normalizeNoEndSeparator states in the javadoc that :
"A double slash will be merged to a single slash (but UNC names are handled)."
It has been observed that if a double backslash occurs after the colon in a windows filepath, then the returned path still contains this double backslash. For example:
' C:\\Program Files\\ExampleDirectory ' --> ' C:\\Program Files\ExampleDirectory `
While the expectation is that we should be returning ' C:\Program Files\ExampleDirectory '
> FilenameUtils#normalizeNoEndSeparator does not sanitize multiple backslashes directly after the colon in windows file paths
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: IO-585
> URL: https://issues.apache.org/jira/browse/IO-585
> Project: Commons IO
> Issue Type: Bug
> Affects Versions: 2.6
> Reporter: Adam McClenaghan
> Priority: Minor
>
> FilenameUtils#normalizeNoEndSeparator states in the javadoc that :
> "A double slash will be merged to a single slash (but UNC names are handled)."
> It has been observed that if a double backslash occurs after the colon in a windows filepath, then the returned path still contains this double backslash. For example:
> {code:java}
> C:\\Program Files\\ExampleDirectory --> C:\\Program Files\ExampleDirectory {code}
> While the expectation is that we should be returning ' C:\Program Files\ExampleDirectory '
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)