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:
parent
5332eb402b
commit
cb4a951f4c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user