has_changed flag is set.
(fhandler_disk_file::touch_ctime): Reset has_changed flag on success.
+2005-02-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fstat): Set st_ctime if
+ has_changed flag is set.
+ (fhandler_disk_file::touch_ctime): Reset has_changed flag on success.
+
2005-02-17 Corinna Vinschen <corinna@vinschen.de>
* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
int __stdcall
fhandler_disk_file::fstat (struct __stat64 *buf)
{
+ if (has_changed ())
+ touch_ctime ();
return fstat_fs (buf);
}
SystemTimeToFileTime (&st, &ft);
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
+ else
+ has_changed (false);
}
int __stdcall