Merge pull request #5020 from leoetlino/es-safer-import

IOS/ES: Implement ES_AddTitleCancel (and slightly safer import process)
This commit is contained in:
Matthew Parlane
2017-03-12 16:14:17 +13:00
committed by GitHub
4 changed files with 121 additions and 29 deletions

View File

@ -23,6 +23,13 @@ std::string RootUserPath(FromWhichRoot from)
return File::GetUserPath(idx);
}
std::string GetImportTitlePath(u64 title_id, FromWhichRoot from)
{
return RootUserPath(from) + StringFromFormat("/import/%08x/%08x",
static_cast<u32>(title_id >> 32),
static_cast<u32>(title_id));
}
std::string GetTicketFileName(u64 _titleID, FromWhichRoot from)
{
return StringFromFormat("%s/ticket/%08x/%08x.tik", RootUserPath(from).c_str(),

View File

@ -22,6 +22,10 @@ enum FromWhichRoot
};
std::string RootUserPath(FromWhichRoot from);
// Returns /import/%08x/%08x. Intended for use by ES.
std::string GetImportTitlePath(u64 title_id, FromWhichRoot from = FROM_SESSION_ROOT);
std::string GetTicketFileName(u64 _titleID, FromWhichRoot from);
std::string GetTMDFileName(u64 _titleID, FromWhichRoot from);
std::string GetTitleDataPath(u64 _titleID, FromWhichRoot from);