diff options
-rw-r--r-- | source3/smbd/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 53178956cd..4033243888 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -245,7 +245,7 @@ static NTSTATUS open_file(files_struct *fsp, } if ((access_mask & (FILE_READ_DATA|FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_EXECUTE)) || - (local_flags & O_CREAT) || + (!file_existed && (local_flags & O_CREAT)) || ((local_flags & O_TRUNC) == O_TRUNC) ) { /* |