Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8830 from JosJuice/delete-empty-rfl-db
CheckNAND: Delete RFL_DB.dat if empty
  • Loading branch information
leoetlino committed May 24, 2020
2 parents 393ce52 + f71ebfe commit 7449c71
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/Core/Core/WiiUtils.cpp
Expand Up @@ -765,6 +765,18 @@ static NANDCheckResult CheckNAND(IOS::HLE::Kernel& ios, bool repair)
result.bad = true;
}

// Clean up after a bug fixed in https://github.com/dolphin-emu/dolphin/pull/8802
const std::string rfl_db_path = Common::GetMiiDatabasePath(Common::FROM_CONFIGURED_ROOT);
const File::FileInfo rfl_db(rfl_db_path);
if (rfl_db.Exists() && rfl_db.GetSize() == 0)
{
ERROR_LOG(CORE, "CheckNAND: RFL_DB.dat exists but is empty");
if (repair)
File::Delete(rfl_db_path);
else
result.bad = true;
}

for (const u64 title_id : es->GetInstalledTitles())
{
const std::string title_dir = Common::GetTitlePath(title_id, Common::FROM_CONFIGURED_ROOT);
Expand Down

0 comments on commit 7449c71

Please sign in to comment.