fixed crashes when ini, log, and cache files are read-only

This commit is contained in:
Chris Danford
2003-01-11 19:11:55 +00:00
parent 0a92622aac
commit 88840d9020
3 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
#include "Notes.h"
#include "RageUtil.h"
#include "GameManager.h"
#include "RageLog.h"
void NotesWriterSM::WriteGlobalTags(FILE *fp, const Song &out)
{
@@ -95,7 +96,10 @@ bool NotesWriterSM::Write(CString sPath, const Song &out, bool bSavingCache)
FILE* fp = fopen( sPath, "w" );
if( fp == NULL )
RageException::Throw( "Error opening song file '%s' for writing.", sPath.GetString() );
{
LOG->Warn( "Error opening song file '%s' for writing.", sPath.GetString() );
return false;
}
WriteGlobalTags(fp, out);
if(bSavingCache) {