*Reverted something that was introduced in r341. Nand emulation should now work again.

This commit is contained in:
overjoy.psm 2012-05-12 23:49:00 +00:00
parent 49a31c4f25
commit 05a95db4db

View File

@ -188,12 +188,14 @@ void Nand::Set_NandPath(string path)
if(isalnum(*(path.end())))
path.push_back('/');
else
path.replace(path.length() - 1, 1, "/");
//path.replace(path.length() - 1, 1, "/"); WTF?
*(path.end()) = '/';
if(path.size() <= 32)
memcpy(NandPath, path.c_str(), path.size());
else
memset(NandPath, 0, sizeof(NandPath));
gprintf("NandPath = %s\n", NandPath);
}
@ -811,6 +813,9 @@ void Nand::CreateTitleTMD(const char *path, dir_discHdr *hdr)
CreatePath("%s/title/%08x/%08x/content", path, highTID, lowTID);
char nandpath[MAX_FAT_PATH];
if(path[strlen(path)-1] == '/')
snprintf(nandpath, sizeof(nandpath), "%stitle/%08x/%08x/content/title.tmd", path, highTID, lowTID);
else
snprintf(nandpath, sizeof(nandpath), "%s/title/%08x/%08x/content/title.tmd", path, highTID, lowTID);
struct stat filestat;