We need to check if we have an exact match in order to match BeOS's behavior (a directory is considered to contain itself on R5). Nice catch Axel!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28757 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a94c1dc58d
commit
4ebaf16fab
@ -511,7 +511,7 @@ BDirectory::Contains(const BEntry *entry, int32 nodeFlags) const
|
||||
uint32 dirLen = strlen(dirPath.Path());
|
||||
|
||||
if (!strncmp(dirPath.Path(), entryPath.Path(), dirLen)) {
|
||||
if (strlen(entryPath.Path()) > dirLen && entryPath.Path()[dirLen] == '/')
|
||||
if (strlen(entryPath.Path()) == dirLen || entryPath.Path()[dirLen] == '/')
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user