summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0adc4e80f6..541789d846 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1269,13 +1269,6 @@ void reply_setatr(struct smb_request *req)
mode = SVAL(req->vwv+0, 0);
mtime = srv_make_unix_date3(req->vwv+1);
- ft.mtime = convert_time_t_to_timespec(mtime);
- status = smb_set_file_time(conn, NULL, smb_fname, &ft, true);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- goto out;
- }
-
if (mode != FILE_ATTRIBUTE_NORMAL) {
if (VALID_STAT_OF_DIR(smb_fname->st))
mode |= FILE_ATTRIBUTE_DIRECTORY;
@@ -1289,6 +1282,13 @@ void reply_setatr(struct smb_request *req)
}
}
+ ft.mtime = convert_time_t_to_timespec(mtime);
+ status = smb_set_file_time(conn, NULL, smb_fname, &ft, true);
+ if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
+ goto out;
+ }
+
reply_outbuf(req, 0, 0);
DEBUG(3, ("setatr name=%s mode=%d\n", smb_fname_str_dbg(smb_fname),