Folder memcards: Suppress "file does not exist" errors for memcard index

This commit is contained in:
Silent 2021-04-11 11:01:10 +02:00 committed by lightningterror
parent affa24e596
commit c27ae16b42
1 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,14 @@ static YAML::Node LoadYAMLFromFile( const wxString& fileName ) {
YAML::Node index;
wxFFile indexFile;
if ( indexFile.Open( fileName, L"r" ) ) {
bool result;
{
// Suppress "file does not exist" errors
wxLogNull noLog;
result = indexFile.Open( fileName, L"r" );
}
if ( result ) {
wxString fileContents;
if ( indexFile.ReadAll( &fileContents ) ) {
index = YAML::Load( fileContents.mbc_str() );