diff options
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.cpp | 29 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.h | 2 |
2 files changed, 0 insertions, 31 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) diff --git a/Source/Core/DiscIO/NANDContentLoader.h b/Source/Core/DiscIO/NANDContentLoader.h index 6e6a5d77e8..3b16b82bda 100644 --- a/Source/Core/DiscIO/NANDContentLoader.h +++ b/Source/Core/DiscIO/NANDContentLoader.h @@ -79,7 +79,6 @@ public: ~CNANDContentLoader(); bool IsValid() const; - void RemoveTitle() const; const SNANDContent* GetContentByID(u32 id) const; const SNANDContent* GetContentByIndex(int index) const; const IOS::ES::TMDReader& GetTMD() const { return m_tmd; } @@ -111,7 +110,6 @@ public: const CNANDContentLoader& GetNANDLoader(const std::string& content_path); const CNANDContentLoader& GetNANDLoader(u64 title_id, Common::FromWhichRoot from); - bool RemoveTitle(u64 title_id, Common::FromWhichRoot from); void ClearCache(); private: |
