You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Trung Pham (Jira)" <ji...@apache.org> on 2021/03/26 12:32:00 UTC
[jira] [Created] (IO-727) FilenameUtils.directoryContains() and
FileUtils.directoryContains() return wrong result when parent and child
have the same path prefix
Trung Pham created IO-727:
-----------------------------
Summary: FilenameUtils.directoryContains() and FileUtils.directoryContains() return wrong result when parent and child have the same path prefix
Key: IO-727
URL: https://issues.apache.org/jira/browse/IO-727
Project: Commons IO
Issue Type: Bug
Components: Utilities
Reporter: Trung Pham
FilenameUtils.directoryContains() and FileUtils.directoryContains() will return `true` with the following input.
{code:java}
canonicalParent: /path/foo
canonicalChild: /path/foobar
{code}
There were several issues on this but the problem still remains.
IO-423 didn't do anything.
IO-466 test case added in [676c03|https://github.com/apache/commons-io/commit/67325cf97946f053da51dd358a9ffca0a9676c03] just happened to passed because the input file didn't exist.
I'll try to make a PR with tests to demonstrate the bug.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)