summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/reply.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 052884480b..acd8dbbc7c 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -397,7 +397,8 @@ int reply_chkpth(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
if (check_name(name,conn)) {
if (VALID_STAT(sbuf) || vfs_stat(conn,name,&sbuf) == 0)
- ok = S_ISDIR(sbuf.st_mode);
+ if (!(ok = S_ISDIR(sbuf.st_mode)))
+ errno = ENOTDIR;
}
if (!ok) {