Also return B_NOT_A_DIRECTORY in write_overlay when appropriate.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33035 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-09-10 03:29:04 +00:00
parent 5332eb402b
commit cb4a951f4c

View File

@ -958,6 +958,14 @@ status_t
OverlayInode::OpenDir(void **cookie, bool attribute)
{
RecursiveLocker locker(fLock);
if (!attribute) {
if (!fHasStat)
_PopulateStat();
if (!S_ISDIR(fStat.st_mode))
return B_NOT_A_DIRECTORY;
}
if (!attribute && !fHasDirents)
_PopulateDirents();
else if (attribute && !fHasAttributeDirents)