summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 9c69b3bf2c..cd4f605c39 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5737,10 +5737,11 @@ static NTSTATUS smb_set_file_disposition_info(connection_struct *conn,
(unsigned int)dosmode,
(unsigned int)delete_on_close ));
- status = can_set_delete_on_close(fsp, delete_on_close, dosmode);
-
- if (!NT_STATUS_IS_OK(status)) {
- return status;
+ if (delete_on_close) {
+ status = can_set_delete_on_close(fsp, dosmode);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
}
/* The set is across all open files on this dev/inode pair. */