From 95e68fa7f8c109204b3ddaeb530e192c71b40e58 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 10 Mar 2005 21:43:58 +0000 Subject: r5731: Get delayed write semantics closer to W2K3. We need to store 2 times. This may fix bug #2382. Jeremy. (This used to be commit a27c351e6beafc6609790a9bb9a3d0a1331e8f35) --- source3/smbd/fileio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/smbd/fileio.c') diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index a21bd69a36c..3048c27fa25 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. */ -- cgit