Write files in such a way that a program crash, system crash, powerdown,

etc. won't cause data loss if we're running on a journalling filesystem.
This commit is contained in:
Glenn Maynard
2003-12-21 07:23:29 +00:00
parent 50f5ddc5ea
commit 20792a51bb
10 changed files with 178 additions and 38 deletions
+2 -2
View File
@@ -100,10 +100,10 @@ RageLog::RageLog()
remove( INFO_PATH );
// Open log file and leave it open.
if( !g_fileLog.Open( LOG_PATH, RageFile::WRITE ) )
if( !g_fileLog.Open( LOG_PATH, RageFile::WRITE|RageFile::STREAMED ) )
fprintf( stderr, "Couldn't open %s: %s", LOG_PATH, g_fileLog.GetError().c_str() );
if( !g_fileInfo.Open( INFO_PATH, RageFile::WRITE ) )
if( !g_fileInfo.Open( INFO_PATH, RageFile::WRITE|RageFile::STREAMED ) )
fprintf( stderr, "Couldn't open %s: %s", INFO_PATH, g_fileInfo.GetError().c_str() );
this->Info( PRODUCT_NAME_VER );