Create ticket subdirectory if missing during title import

This commit is contained in:
Nadia Holmquist Pedersen 2021-12-16 06:33:32 +01:00
parent f1c9b42b45
commit 203cf5164b
1 changed files with 2 additions and 0 deletions

View File

@ -1009,6 +1009,8 @@ bool ImportTitle(const char* appfile, u8* tmd, bool readonly)
u32 nwrite;
// ticket
sprintf(fname, "0:/ticket/%08x", titleid0);
f_mkdir(fname);
sprintf(fname, "0:/ticket/%08x/%08x.tik", titleid0, titleid1);
if (!CreateTicket(fname, *(u32*)&tmd[0x18C], *(u32*)&tmd[0x190], header[0x1E]))