file_vopen: Retry as a directory in case of EISDIR
This allows you to open() a directory without O_DIRECTORY.
This commit is contained in:
parent
aa67e0a0f4
commit
4eee9af668
@ -186,6 +186,11 @@ static int file_vopen(FAR struct file *filep, FAR const char *path,
|
||||
ret = -ENXIO;
|
||||
}
|
||||
|
||||
if (ret == -EISDIR)
|
||||
{
|
||||
ret = dir_allocate(filep, desc.relpath);
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
goto errout_with_inode;
|
||||
|
Loading…
Reference in New Issue
Block a user