diff options
-rw-r--r-- | source3/smbd/open.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 4ea51dd4e9..17d9f6f8fb 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2402,10 +2402,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp->oplock_type = NO_OPLOCK; } - if (info == FILE_WAS_OVERWRITTEN || info == FILE_WAS_CREATED || info == FILE_WAS_SUPERSEDED) { - new_file_created = True; - } - set_share_mode(lck, fsp, get_current_uid(conn), req ? req->mid : 0, fsp->oplock_type); @@ -2427,6 +2423,12 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp->initial_delete_on_close = True; } + if (info == FILE_WAS_OVERWRITTEN + || info == FILE_WAS_CREATED + || info == FILE_WAS_SUPERSEDED) { + new_file_created = True; + } + if (new_file_created) { /* Files should be initially set as archive */ if (lp_map_archive(SNUM(conn)) || |