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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user