summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 55ea8960de..ba1fbf227c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2142,7 +2142,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
* If requested, truncate the file.
*/
- if (flags2&O_TRUNC) {
+ if (file_existed && (flags2&O_TRUNC)) {
/*
* We are modifing the file after open - update the stat
* struct..