summaryrefslogtreecommitdiff
path: root/libnetfs/dir-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/dir-lookup.c')
-rw-r--r--libnetfs/dir-lookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c
index d77feac8..dfcb7819 100644
--- a/libnetfs/dir-lookup.c
+++ b/libnetfs/dir-lookup.c
@@ -39,7 +39,7 @@ netfs_S_dir_lookup (struct protid *dircred,
{
int create; /* true if O_CREAT flag set */
int excl; /* true if O_EXCL flag set */
- int mustbedir = 0; /* true if the result must be S_IFDIR */
+ int mustbedir = (flags & O_DIRECTORY) != 0; /* true if the result must be S_IFDIR */
int lastcomp = 0; /* true if we are at the last component */
int newnode = 0; /* true if this node is newly created */
int nsymlinks = 0;