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