If the flush fails, don't clear the buffer. That way, if Flush() is called multiple

times, and for some reason it succeeds on the second call (eg. more disk
space is now available), we don't lose that data.
This commit is contained in:
Glenn Maynard
2005-12-06 16:23:38 +00:00
parent 445074885a
commit 8ab36ad2a0
+1
View File
@@ -352,6 +352,7 @@ int RageFileObjDirect::FlushInternal()
{
LOG->Warn("Error writing %s: %s", this->m_sPath.c_str(), strerror(errno) );
SetError( strerror(errno) );
return -1;
}
m_sWriteBuf.erase();