diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index 7b3a7544cc8..b62aaf0cffe 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -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;