Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

cagdasyelen
Copy link

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
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
2 participants