Scott Hoof created IO-475:
-----------------------------

             Summary: 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: 2.4, 2.3, 2.2, 2.1, 2.0.1, 2.0, 1.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)

Reply via email to