From 8ab36ad2a03956a111433c49a87e5f865ef66dac Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 6 Dec 2005 16:23:38 +0000 Subject: [PATCH] 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. --- stepmania/src/RageFileDriverDirect.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index 7717339925..b2337d324a 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -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();