* 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:
parent
b066a19513
commit
3419b5bc2b
|
@ -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>
|
||||
|
||||
* times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
|
||||
|
|
|
@ -374,6 +374,8 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
|
|||
int __stdcall
|
||||
fhandler_disk_file::fstat (struct __stat64 *buf)
|
||||
{
|
||||
if (has_changed ())
|
||||
touch_ctime ();
|
||||
return fstat_fs (buf);
|
||||
}
|
||||
|
||||
|
@ -387,6 +389,8 @@ fhandler_disk_file::touch_ctime (void)
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue