GameList: Fix compatibility xml saving

This commit is contained in:
Connor McLaughlin 2020-09-24 22:16:23 +10:00
parent f990d6ab3b
commit 699242b1a7
1 changed files with 6 additions and 1 deletions

View File

@ -1039,7 +1039,12 @@ bool GameList::SaveCompatibilityDatabaseForEntry(const GameListCompatibilityEntr
InitElementForCompatibilityEntry(&doc, entry_elem, entry);
}
error = doc.SaveFile(m_compatibility_list_filename.c_str());
fp.reset();
fp = FileSystem::OpenManagedCFile(m_compatibility_list_filename.c_str(), "wb");
if (!fp)
return SaveCompatibilityDatabase();
error = doc.SaveFile(fp.get());
if (error != tinyxml2::XML_SUCCESS)
{
Log_ErrorPrintf("Failed to update compatibility list '%s': %s", m_compatibility_list_filename.c_str(),