mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-22 11:43:18 +00:00
Cleanup previously installed contents when installing anew
This commit is contained in:
parent
49651f448b
commit
c861c7d85c
2 changed files with 12 additions and 4 deletions
|
@ -91,11 +91,15 @@ namespace tin::install::nsp
|
|||
std::shared_ptr<nx::ncm::ContentStorage> contentStorage(new nx::ncm::ContentStorage(m_destStorageId));
|
||||
|
||||
// Attempt to delete any leftover placeholders
|
||||
try
|
||||
{
|
||||
try {
|
||||
contentStorage->DeletePlaceholder(*(NcmPlaceHolderId*)&ncaId);
|
||||
}
|
||||
catch (...) {}
|
||||
// Attempt to delete leftover ncas
|
||||
try {
|
||||
contentStorage->Delete(ncaId);
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
LOG_DEBUG("Size: 0x%lx\n", ncaSize);
|
||||
|
||||
|
|
|
@ -87,11 +87,15 @@ namespace tin::install::xci
|
|||
std::shared_ptr<nx::ncm::ContentStorage> contentStorage(new nx::ncm::ContentStorage(m_destStorageId));
|
||||
|
||||
// Attempt to delete any leftover placeholders
|
||||
try
|
||||
{
|
||||
try {
|
||||
contentStorage->DeletePlaceholder(*(NcmPlaceHolderId*)&ncaId);
|
||||
}
|
||||
catch (...) {}
|
||||
// Attempt to delete leftover ncas
|
||||
try {
|
||||
contentStorage->Delete(ncaId);
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
LOG_DEBUG("Size: 0x%lx\n", ncaSize);
|
||||
|
||||
|
|
Loading…
Reference in a new issue