* 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.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2005-02-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
|
* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
|
||||||
|
@@ -374,6 +374,8 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
|
|||||||
int __stdcall
|
int __stdcall
|
||||||
fhandler_disk_file::fstat (struct __stat64 *buf)
|
fhandler_disk_file::fstat (struct __stat64 *buf)
|
||||||
{
|
{
|
||||||
|
if (has_changed ())
|
||||||
|
touch_ctime ();
|
||||||
return fstat_fs (buf);
|
return fstat_fs (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,6 +389,8 @@ fhandler_disk_file::touch_ctime (void)
|
|||||||
SystemTimeToFileTime (&st, &ft);
|
SystemTimeToFileTime (&st, &ft);
|
||||||
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
|
if (!SetFileTime (get_io_handle (), &ft, NULL, NULL))
|
||||||
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
|
debug_printf ("SetFileTime (%s) failed, %E", get_win32_name ());
|
||||||
|
else
|
||||||
|
has_changed (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int __stdcall
|
int __stdcall
|
||||||
|
Reference in New Issue
Block a user