From e90ab07050f2fe8dd1c4399e5deff7eddf66e6d0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 25 Oct 2004 01:56:01 +0000 Subject: r3178: honor the write_time on pvfs_close() (This used to be commit 4e28c45bafa453eaa94716a5b77d830b81efe6cf) --- source4/ntvfs/posix/pvfs_open.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 7f06626706..ac2742d357 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -605,6 +605,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs, struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; NTSTATUS status; + struct utimbuf unix_times; if (io->generic.level != RAW_CLOSE_CLOSE) { return ntvfs_map_close(req, io, ntvfs); @@ -615,6 +616,10 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs, return NT_STATUS_INVALID_HANDLE; } + unix_times.actime = 0; + unix_times.modtime = io->close.in.write_time; + utime(f->name->full_name, &unix_times); + if (f->fd != -1 && close(f->fd) == -1) { status = pvfs_map_errno(pvfs, errno); -- cgit