From 6a03a248227bf762d64148bd8e68b0a9663fecce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 1 Oct 2017 12:46:38 +0200 Subject: [PATCH] WiiUtils: Warn before overwriting during WAD import --- Source/Core/Core/WiiUtils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/WiiUtils.cpp b/Source/Core/Core/WiiUtils.cpp index 6667bf80e7..5bca8ae1cc 100644 --- a/Source/Core/Core/WiiUtils.cpp +++ b/Source/Core/Core/WiiUtils.cpp @@ -122,6 +122,15 @@ bool InstallWAD(const std::string& wad_path) if (wad.GetTMD().GetContents() == installed_contents) return true; + // If a different version is currently installed, warn the user to make sure + // they don't overwrite the current version by mistake. + if (ios.GetES()->FindInstalledTMD(wad.GetTMD().GetTitleId()).IsValid() && + !AskYesNoT("A different version of this title is already installed on the NAND. " + "Installing this WAD will replace it irreversibly. Continue?")) + { + return false; + } + const bool result = InstallWAD(ios, wad); DiscIO::NANDContentManager::Access().ClearCache();