commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IO-423) FilenameUtils.directoryContains assumes separator at end of parent path
Date Wed, 16 Jul 2014 21:37:06 GMT

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

Thomas Neidhart resolved IO-423.
--------------------------------

    Resolution: Invalid

The javadoc of the method states that the input needs to be normalized, i.e. the canonical
path of the respective file resource. A canonical path does not have a '/' at the end.

> FilenameUtils.directoryContains assumes separator at end of parent path
> -----------------------------------------------------------------------
>
>                 Key: IO-423
>                 URL: https://issues.apache.org/jira/browse/IO-423
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Vinithra Varadharajan
>
> FilenameUtils.directoryContains("/abc", "/abcd") returns true, while FilenameUtils.directoryContains("/abc/",
"/abcd") returns false.
> The implementation does a simple checkStartsWith() without taking the separator into
consideration.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message