Fix strange validity check in BDirectory::Contains(). If either path ends up as
invalid it must not be used. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28015 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fd630a4552
commit
e84abff2bd
@ -505,7 +505,7 @@ BDirectory::Contains(const BEntry *entry, int32 nodeFlags) const
|
||||
// the entry and check, if the latter is a prefix of the first one.
|
||||
BPath dirPath(this, ".", true);
|
||||
BPath entryPath(entry);
|
||||
if (dirPath.InitCheck() == B_OK && entryPath.InitCheck() != B_OK)
|
||||
if (dirPath.InitCheck() != B_OK || entryPath.InitCheck() != B_OK)
|
||||
return false;
|
||||
|
||||
return !strncmp(dirPath.Path(), entryPath.Path(), strlen(dirPath.Path()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user