diff --git a/stepmania/src/RageFile.h b/stepmania/src/RageFile.h index 190a8bd79e..6ad9d255f3 100644 --- a/stepmania/src/RageFile.h +++ b/stepmania/src/RageFile.h @@ -27,7 +27,11 @@ public: WRITE = 0x2, /* Always write directly to the destination file; don't do a safe write. (for logs) */ - STREAMED = 0x4 + STREAMED = 0x4, + + /* Flush the file to disk on close. Combined with not streaming, this results + * in very safe writes, but is slow. */ + SLOW_FLUSH = 0x8 }; RageFile(); diff --git a/stepmania/src/RageFileDriverDirect.cpp b/stepmania/src/RageFileDriverDirect.cpp index e88f26aadf..f69346157c 100644 --- a/stepmania/src/RageFileDriverDirect.cpp +++ b/stepmania/src/RageFileDriverDirect.cpp @@ -186,7 +186,7 @@ RageFileObjDirect::~RageFileObjDirect() /* Flush the output buffer. */ Flush(); - if( !(parent.GetOpenMode() & RageFile::STREAMED) ) + if( parent.GetOpenMode() & RageFile::SLOW_FLUSH ) { /* Force a kernel buffer flush. */ if( fsync( fd ) == -1 )