From 41dd759a50c53504efcd26771a265f34f20a1445 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 3 Jan 2002 20:49:06 +0000 Subject: Ensure modtime is set correctly on destination files in copy command. Jeremy. (This used to be commit fb1ab02553e01df0464f0df3eea7ae6a66b4104b) --- source3/smbd/reply.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 12834e63a7..0e7eca3ac2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3287,6 +3287,10 @@ static BOOL copy_file(char *src,char *dest1,connection_struct *conn, int ofun, ret = vfs_transfer_file(fsp1, fsp2, src_sbuf.st_size); close_file(fsp1,False); + + /* Ensure the modtime is set correctly on the destination file. */ + fsp2->pending_modtime = src_sbuf.st_mtime; + /* * As we are opening fsp1 read-only we only expect * an error on close on fsp2 if we are out of space. -- cgit