inode_stat: handle INODE_IS_PSEUDODIR case
If you open() a directory and fstat() it, you come here. This commit fixes the file type in that case.
This commit is contained in:
parent
c48feac0e9
commit
aa67e0a0f4
|
@ -381,9 +381,9 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf, int resolve)
|
||||||
|
|
||||||
/* Determine the type of the inode */
|
/* Determine the type of the inode */
|
||||||
|
|
||||||
/* Check for a mountpoint */
|
/* Check for a mountpoint and a pseudo dir */
|
||||||
|
|
||||||
if (INODE_IS_MOUNTPT(inode))
|
if (INODE_IS_MOUNTPT(inode) || INODE_IS_PSEUDODIR(inode))
|
||||||
{
|
{
|
||||||
buf->st_mode |= S_IFDIR;
|
buf->st_mode |= S_IFDIR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue