Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3F9E17B72 for ; Tue, 7 Apr 2015 23:04:13 +0000 (UTC) Received: (qmail 11024 invoked by uid 500); 7 Apr 2015 23:04:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 10933 invoked by uid 500); 7 Apr 2015 23:04:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 10721 invoked by uid 99); 7 Apr 2015 23:04:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 23:04:13 +0000 Date: Tue, 7 Apr 2015 23:04:13 +0000 (UTC) From: "Scott Hoof (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IO-475) FilenameUtils#normalizeNoEndSeparator returns null for UNC prefix without trailing backslash MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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}\ {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:\ ). 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}\ {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:\ ). > 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 (v6.3.4#6332)