mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +00:00
Merge pull request #6168 from PabloMK7/cia_update_fix
Fix handling of auto-updating ncch apps
This commit is contained in:
commit
38b8bf12de
4 changed files with 54 additions and 10 deletions
|
@ -315,7 +315,14 @@ bool CIAFile::Close() const {
|
|||
if (abort)
|
||||
break;
|
||||
|
||||
FileUtil::Delete(GetTitleContentPath(media_type, old_tmd.GetTitleID(), old_index));
|
||||
// If the file to delete is the current launched rom, signal the system to delete
|
||||
// the current rom instead of deleting it now, once all the handles to the file
|
||||
// are closed.
|
||||
std::string to_delete =
|
||||
GetTitleContentPath(media_type, old_tmd.GetTitleID(), old_index);
|
||||
if (!(Core::System::GetInstance().IsPoweredOn() &&
|
||||
Core::System::GetInstance().SetSelfDelete(to_delete)))
|
||||
FileUtil::Delete(to_delete);
|
||||
}
|
||||
|
||||
FileUtil::Delete(old_tmd_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue