diff --git a/stepmania/src/Bookkeeper.cpp b/stepmania/src/Bookkeeper.cpp index a4f885743e..073890a45d 100644 --- a/stepmania/src/Bookkeeper.cpp +++ b/stepmania/src/Bookkeeper.cpp @@ -82,7 +82,7 @@ void Bookkeeper::ReadFromDisk() RageFile f; if( !f.Open(COINS_DAT, RageFile::READ) ) { - LOG->Warn( "Couldn't open file '%s'", COINS_DAT.c_str() ); + LOG->Trace( "Couldn't open file \"%s\": %s", COINS_DAT.c_str(), f.GetError().c_str() ); return; } @@ -114,7 +114,7 @@ void Bookkeeper::WriteToDisk() RageFile f; if( !f.Open(COINS_DAT, RageFile::WRITE) ) { - LOG->Warn( "Couldn't open file '%s'", COINS_DAT.c_str() ); + LOG->Warn( "Couldn't open file \"%s\" for writing: %s", COINS_DAT.c_str(), f.GetError().c_str() ); return; } diff --git a/stepmania/src/IniFile.cpp b/stepmania/src/IniFile.cpp index e9e6a97411..984fb04d1f 100644 --- a/stepmania/src/IniFile.cpp +++ b/stepmania/src/IniFile.cpp @@ -41,7 +41,7 @@ bool IniFile::ReadFile() if( !f.Open( path ) ) { LOG->Trace( "Reading '%s' failed: %s", path.c_str(), f.GetError().c_str() ); - error = ssprintf("Unable to open ini file: %s", f.GetError().c_str() ); + error = f.GetError(); return 0; } @@ -91,7 +91,7 @@ void IniFile::WriteFile() if( !f.Open( path, RageFile::WRITE ) ) { LOG->Trace( "Writing '%s' failed: %s", path.c_str(), f.GetError().c_str() ); - error = ssprintf("Unable to open ini file for writing: %s", f.GetError().c_str() ); + error = f.GetError(); return; } diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 0f20482e13..ec19076ae9 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -447,7 +447,7 @@ void ProfileManager::ReadSongScoresFromDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::READ) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Trace( "Couldn't open file \"%s\": %s", fn.c_str(), f.GetError().c_str() ); return; } @@ -562,7 +562,7 @@ void ProfileManager::ReadCategoryScoresFromDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::READ) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Trace( "Couldn't open file \"%s\": %s", fn.c_str(), f.GetError().c_str() ); return; } @@ -611,7 +611,7 @@ void ProfileManager::ReadCourseScoresFromDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::READ) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Trace( "Couldn't open file \"%s\": %s", fn.c_str(), f.GetError().c_str() ); return; } @@ -786,7 +786,7 @@ void ProfileManager::SaveCategoryScoresToDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::WRITE) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Warn( "Couldn't open file \"%s\" for writing: %s", fn.c_str(), f.GetError().c_str() ); return; } @@ -821,7 +821,7 @@ void ProfileManager::SaveCourseScoresToDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::WRITE) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Warn( "Couldn't open file \"%s\" for writing: %s", fn.c_str(), f.GetError().c_str() ); return; } @@ -883,7 +883,7 @@ void ProfileManager::SaveSongScoresToDir( CString sDir, MemoryCard mc ) RageFile f; if( !f.Open(fn, RageFile::WRITE) ) { - LOG->Warn( "Couldn't open file '%s'", fn.c_str() ); + LOG->Warn( "Couldn't open file \"%s\" for writing: %s", fn.c_str(), f.GetError().c_str() ); return; }