From 8f47adf1c6973dfffe38c9beebb549a998e5f84d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 16 Apr 2005 12:53:48 +0000 Subject: [PATCH] * fhandler_disk_file.cc (fhandler_base::utimes_fs): Drop touching ChangeTime. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_disk_file.cc | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a807e6040..ed3d99d79 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-04-16 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_base::utimes_fs): Drop touching + ChangeTime. + 2005-04-16 Christopher Faylor * fhandler.cc (fhandler::dup): Duplicate flags, too. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 8a08f3b91..902e40aa8 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -833,7 +833,7 @@ fhandler_disk_file::utimes (const struct timeval *tvp) int fhandler_base::utimes_fs (const struct timeval *tvp) { - FILETIME lastaccess, lastwrite, lastchange; + FILETIME lastaccess, lastwrite; struct timeval tmp[2]; query_open (query_write_attributes); @@ -862,13 +862,11 @@ fhandler_base::utimes_fs (const struct timeval *tvp) } timeval_to_filetime (&tvp[0], &lastaccess); timeval_to_filetime (&tvp[1], &lastwrite); - /* Update ctime */ - timeval_to_filetime (&tmp[0], &lastchange); debug_printf ("incoming lastaccess %08x %08x", tvp[0].tv_sec, tvp[0].tv_usec); if (is_fs_special ()) SetFileAttributes (pc, (DWORD) pc & ~FILE_ATTRIBUTE_READONLY); - BOOL res = SetFileTime (get_handle (), &lastchange, &lastaccess, &lastwrite); + BOOL res = SetFileTime (get_handle (), NULL, &lastaccess, &lastwrite); DWORD errcode = GetLastError (); if (is_fs_special ()) SetFileAttributes (pc, pc);