summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/NANDContentLoader.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-05-07 16:43:27 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-05-13 00:34:58 +0200
commitbacf52384ffcd83c2a8856ac4eabe63c0474d244 (patch)
tree1d76343f7684ab2e19aed6986e41745bf40a2ef5 /Source/Core/DiscIO/NANDContentLoader.cpp
parent12801fd722e4f4038722fc35de4edcb1f5d1b3ca (diff)
IOS/ES: Implement DeleteTitleContent properly
Just like DeleteTitle, Using CNANDContentManager is overkill, inefficient and useless. And it results in a few failures in situations where a delete should just always work. But here it gets bonus points, because it manages to actually use the TMD for deleting contents, when IOS does none of that and just deletes files ending with .app in the title content directory. :)
Diffstat (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp')
-rw-r--r--Source/Core/DiscIO/NANDContentLoader.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp
index b87e52a246..4e7f6f12ba 100644
--- a/Source/Core/DiscIO/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/NANDContentLoader.cpp
@@ -241,40 +241,11 @@ const CNANDContentLoader& CNANDContentManager::GetNANDLoader(u64 title_id,
return GetNANDLoader(path);
}
-bool CNANDContentManager::RemoveTitle(u64 title_id, Common::FromWhichRoot from)
-{
- auto& loader = GetNANDLoader(title_id, from);
- if (!loader.IsValid())
- return false;
- loader.RemoveTitle();
- return GetNANDLoader(title_id, from).IsValid();
-}
-
void CNANDContentManager::ClearCache()
{
m_map.clear();
}
-void CNANDContentLoader::RemoveTitle() const
-{
- const u64 title_id = m_tmd.GetTitleId();
- INFO_LOG(DISCIO, "RemoveTitle %016" PRIx64, title_id);
- if (IsValid())
- {
- // remove TMD?
- for (const auto& content : m_Content)
- {
- if (!content.m_metadata.IsShared())
- {
- std::string path = StringFromFormat("%s/%08x.app", m_Path.c_str(), content.m_metadata.id);
- INFO_LOG(DISCIO, "Delete %s", path.c_str());
- File::Delete(path);
- }
- }
- CNANDContentManager::Access().ClearCache(); // deletes 'this'
- }
-}
-
u64 CNANDContentManager::Install_WiiWAD(const std::string& filename)
{
if (filename.find(".wad") == std::string::npos)