You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Scott Hoof (JIRA)" <ji...@apache.org> on 2015/04/08 01:01:12 UTC

[jira] [Updated] (IO-475) FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash

     [ https://issues.apache.org/jira/browse/IO-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Hoof updated IO-475:
--------------------------
    Description: 
FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash.

The observed behavior is that normalizeNoEndSeparator returns a non-null value for the following unc-path-prefix:
\\\\{serverName-or-IP}\
but returns null for the following unc-path-prefix:
\\\\{serverName-or-IP}

There is nothing in the Microsoft API documentation which would suggest that the second unc-path-prefix would be invalid.

Therefore the expectation is that they should be treated as equivalent by FilenameUtils#normalizeNoEndSeparator.

The handling of unc-path-prefix is inconsistent with how FilenameUtils#normalizeNoEndSeparator handles drive relative and drive absolute path prefixes, where each notation is accepted and returns a non-null --> ( C: and C:\ ).

  was:
FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash.

The observed behavior is that normalizeNoEndSeparator returns a non-null value for the following unc-path-prefix:
\\{serverName-or-IP}\
but returns null for the following unc-path-prefix:
\\{serverName-or-IP}

There is nothing in the Microsoft API documentation which would suggest that the second unc-path-prefix would be invalid.

Therefore the expectation is that they should be treated as equivalent by FilenameUtils#normalizeNoEndSeparator.

The handling of unc-path-prefix is inconsistent with how FilenameUtils#normalizeNoEndSeparator handles drive relative and drive absolute path prefixes, where each notation is accepted and returns a non-null --> ( C: and C:\ ).


> FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash
> --------------------------------------------------------------------------------------------
>
>                 Key: IO-475
>                 URL: https://issues.apache.org/jira/browse/IO-475
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 1.4, 2.0, 2.0.1, 2.1, 2.2, 2.3, 2.4
>            Reporter: Scott Hoof
>            Priority: Minor
>
> FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash.
> The observed behavior is that normalizeNoEndSeparator returns a non-null value for the following unc-path-prefix:
> \\\\{serverName-or-IP}\
> but returns null for the following unc-path-prefix:
> \\\\{serverName-or-IP}
> There is nothing in the Microsoft API documentation which would suggest that the second unc-path-prefix would be invalid.
> Therefore the expectation is that they should be treated as equivalent by FilenameUtils#normalizeNoEndSeparator.
> The handling of unc-path-prefix is inconsistent with how FilenameUtils#normalizeNoEndSeparator handles drive relative and drive absolute path prefixes, where each notation is accepted and returns a non-null --> ( C: and C:\ ).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)