mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
IOS/ES: Write import files to /import first
This is slightly safer than writing contents to /title directly. We still cannot rename everything in one go atomically, but this allows implementing AddTitleCancel very easily. Also, this ensures that when a title import fails, no incomplete files will be left in the title directory, which can mess up the system menu.
This commit is contained in:
@ -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(),
|
||||
|
Reference in New Issue
Block a user