r3240: - update the rules for what error codes should be given on the
[jelmer/samba4-debian.git] / source / ntvfs / posix / pvfs_open.c
index 5e162ad147743a3cc484a2a2b6d302e7b2451f31..ffd1520b07010635548a5082814cdf475bab7b7d 100644 (file)
@@ -643,9 +643,11 @@ 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 (!null_time(io->close.in.write_time)) {
+               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) {