diff options
| author | JosJuice <josjuice@gmail.com> | 2020-05-24 11:04:23 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-05-24 11:04:23 +0200 |
| commit | f71ebfe9c1069b389d5875c0d85810af7e70b220 (patch) | |
| tree | 833f90a9b9c38e6af8ae65d299e78b7b09aebb34 /Source/Core | |
| parent | 9dafeb3bc50d8993d31b6b2fa799d9392ce21cd1 (diff) | |
CheckNAND: Delete RFL_DB.dat if empty
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/WiiUtils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/Core/Core/WiiUtils.cpp b/Source/Core/Core/WiiUtils.cpp index f22decaf19..e198e069e3 100644 --- a/Source/Core/Core/WiiUtils.cpp +++ b/Source/Core/Core/WiiUtils.cpp @@ -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); |
