* fhandler.cc (fhandler_base::raw_write): Mark as changed on

successful write.
	* fhandler.h (fhandler_base::status_flags): Add 'has_changed' flag.
	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call
	fhandler_disk_file's own open and close instead of open_fs and
	close_fs.  Mark as changed on success.
	(fhandler_disk_file::fchown): Ditto.
	(fhandler_disk_file::facl): Ditto.
	(fhandler_disk_file::ftruncate): Ditto.
	(fhandler_base::open_fs): Mark as changed when O_TRUNC flag on existing
	file is set.
	(fhandler_disk_file::close): Set st_ctime if has_changed flag is set.
This commit is contained in:
Corinna Vinschen
2005-02-11 15:37:26 +00:00
parent cc9440b6f4
commit 8be730bbb1
4 changed files with 48 additions and 17 deletions

View File

@@ -288,12 +288,14 @@ fhandler_base::raw_write (const void *ptr, size_t len)
if (!WriteFile (get_output_handle (), ptr, len, &bytes_written, 0))
{
if (GetLastError () == ERROR_DISK_FULL && bytes_written > 0)
return bytes_written;
goto written;
__seterrno ();
if (get_errno () == EPIPE)
raise (SIGPIPE);
return -1;
}
written:
has_changed (true);
return bytes_written;
}