Skip to content

[IO-499] FilenameUtils.directoryContains false positive issue #20

Closed
cagdasyelen wants to merge 1 commit into
apache:masterfrom
cagdasyelen:io499-fix
Closed

[IO-499] FilenameUtils.directoryContains false positive issue #20
cagdasyelen wants to merge 1 commit into
apache:masterfrom
cagdasyelen:io499-fix

Conversation

@cagdasyelen

Copy link
Copy Markdown

IO-499 bug has been fixed.

The old version was looking at if the child canonical path string starts with the parent's.
However, it fails in the case of:

.../top/foo
.../top/foo2/b.txt

since the directory path of b.txt starts with the same directory path with the one above even though the second one is a different directory(foo2). This issue is resolved by comparing the path strings of foo and foo2.

@PascalSchumacher

Copy link
Copy Markdown
Contributor

quoting Federico Bonellis comment from the jira issue (https://issues.apache.org/jira/browse/IO-499):

@cagdasyelen I'm afraid this patch doesn't consider the case when the file path is composed using '' separators (aka Windows case). We should adapt it to that case before pulling the patch.

@asfgit asfgit closed this in 722a5af Apr 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants