summaryrefslogtreecommitdiff
path: root/source3/smbd/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/fileio.c')
-rw-r--r--source3/smbd/fileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index a21bd69a36..3048c27fa2 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -142,6 +142,12 @@ static ssize_t real_write_file(files_struct *fsp,char *data,SMB_OFF_T pos, size_
if (fsp->pending_modtime) {
set_filetime(fsp->conn, fsp->fsp_name, fsp->pending_modtime);
+
+ /* If we didn't get the "set modtime" call ourselves, we must
+ store the last write time to restore on close. JRA. */
+ if (!fsp->pending_modtime_owner) {
+ fsp->last_write_time = time(NULL);
+ }
}
/* Yes - this is correct - writes don't update this. JRA. */