summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index dd10a87055..e688f8de48 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -866,7 +866,11 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_
DEBUG(5,("open_file_shared: create new requested for file %s and file already exists.\n",
fname ));
file_free(fsp);
- errno = EEXIST;
+ if (S_ISDIR(psbuf->st_mode)) {
+ errno = EISDIR;
+ } else {
+ errno = EEXIST;
+ }
return NULL;
}