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:
@@ -958,6 +958,14 @@ status_t
|
|||||||
OverlayInode::OpenDir(void **cookie, bool attribute)
|
OverlayInode::OpenDir(void **cookie, bool attribute)
|
||||||
{
|
{
|
||||||
RecursiveLocker locker(fLock);
|
RecursiveLocker locker(fLock);
|
||||||
|
if (!attribute) {
|
||||||
|
if (!fHasStat)
|
||||||
|
_PopulateStat();
|
||||||
|
|
||||||
|
if (!S_ISDIR(fStat.st_mode))
|
||||||
|
return B_NOT_A_DIRECTORY;
|
||||||
|
}
|
||||||
|
|
||||||
if (!attribute && !fHasDirents)
|
if (!attribute && !fHasDirents)
|
||||||
_PopulateDirents();
|
_PopulateDirents();
|
||||||
else if (attribute && !fHasAttributeDirents)
|
else if (attribute && !fHasAttributeDirents)
|
||||||
|
|||||||
Reference in New Issue
Block a user