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

Miriam Cohen commented on IO-475:
---------------------------------

I’m going to work on this issue and propose a fix.

> 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}\
> {backSlash}{backSlash}{serverName-or-IP}{backSlash} 
> but returns null for the following unc-path-prefix:
> \\{serverName-or-IP}
> {backSlash}{backSlash}{serverName-or-IP}
> The markdown seems to eat my backslashes prepended to the 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
(v8.20.10#820010)

Reply via email to