summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-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 1a1c84efed..bf74d997b8 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -401,7 +401,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) {