diff options
-rw-r--r-- | libdiskfs/dir-lookup.c | 2 | ||||
-rw-r--r-- | libnetfs/dir-lookup.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c index 8df81cfa..30e2a2e3 100644 --- a/libdiskfs/dir-lookup.c +++ b/libdiskfs/dir-lookup.c @@ -51,7 +51,7 @@ diskfs_S_dir_lookup (struct protid *dircred, int lastcomp = 0; int newnode = 0; struct dirstat *ds = 0; - int mustbedir = 0; + int mustbedir = (flags & O_DIRECTORY) != 0; mach_msg_type_name_t amt; int type; struct protid *newpi = 0; 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; |