mirror of https://github.com/AxioDL/nod.git
Fixes to work with directory-blob dolphin branch
This commit is contained in:
parent
6454d68abc
commit
8bdbcf0c90
|
@ -180,7 +180,7 @@ bool DiscBase::IPartition::extractToDirectory(const SystemString& path,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Extract Crypto Files */
|
/* Extract Crypto Files */
|
||||||
if (!extractCryptoFiles(path, ctx))
|
if (!extractCryptoFiles(basePath, ctx))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Extract Apploader */
|
/* Extract Apploader */
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
uint32_t vals[2];
|
uint32_t vals[2];
|
||||||
s->seek(0x2440 + 0x14);
|
s->seek(0x2440 + 0x14);
|
||||||
s->read(vals, 8);
|
s->read(vals, 8);
|
||||||
m_apploaderSz = ((32 + SBig(vals[0]) + SBig(vals[1])) + 31) & ~31;
|
m_apploaderSz = 32 + SBig(vals[0]) + SBig(vals[1]);
|
||||||
|
|
||||||
/* Yay files!! */
|
/* Yay files!! */
|
||||||
parseFST(*s);
|
parseFST(*s);
|
||||||
|
|
|
@ -344,7 +344,7 @@ public:
|
||||||
ds->seek(0x2440 + 0x14);
|
ds->seek(0x2440 + 0x14);
|
||||||
uint32_t vals[2];
|
uint32_t vals[2];
|
||||||
ds->read(vals, 8);
|
ds->read(vals, 8);
|
||||||
m_apploaderSz = ((32 + SBig(vals[0]) + SBig(vals[1])) + 31) & ~31;
|
m_apploaderSz = 32 + SBig(vals[0]) + SBig(vals[1]);
|
||||||
|
|
||||||
/* Yay files!! */
|
/* Yay files!! */
|
||||||
parseFST(*ds);
|
parseFST(*ds);
|
||||||
|
@ -473,12 +473,12 @@ public:
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool extractCryptoFiles(const SystemString& path, const ExtractionContext& ctx) const
|
bool extractCryptoFiles(const SystemString& basePath, const ExtractionContext& ctx) const
|
||||||
{
|
{
|
||||||
Sstat theStat;
|
Sstat theStat;
|
||||||
|
|
||||||
/* Extract Ticket */
|
/* Extract Ticket */
|
||||||
SystemString ticketPath = path + _S("/ticket.bin");
|
SystemString ticketPath = basePath + _S("/ticket.bin");
|
||||||
if (ctx.force || Stat(ticketPath.c_str(), &theStat))
|
if (ctx.force || Stat(ticketPath.c_str(), &theStat))
|
||||||
{
|
{
|
||||||
if (ctx.progressCB)
|
if (ctx.progressCB)
|
||||||
|
@ -490,7 +490,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract TMD */
|
/* Extract TMD */
|
||||||
SystemString tmdPath = path + _S("/tmd.bin");
|
SystemString tmdPath = basePath + _S("/tmd.bin");
|
||||||
if (ctx.force || Stat(tmdPath.c_str(), &theStat))
|
if (ctx.force || Stat(tmdPath.c_str(), &theStat))
|
||||||
{
|
{
|
||||||
if (ctx.progressCB)
|
if (ctx.progressCB)
|
||||||
|
@ -502,7 +502,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract Certs */
|
/* Extract Certs */
|
||||||
SystemString certPath = path + _S("/cert.bin");
|
SystemString certPath = basePath + _S("/cert.bin");
|
||||||
if (ctx.force || Stat(certPath.c_str(), &theStat))
|
if (ctx.force || Stat(certPath.c_str(), &theStat))
|
||||||
{
|
{
|
||||||
if (ctx.progressCB)
|
if (ctx.progressCB)
|
||||||
|
@ -516,7 +516,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract H3 */
|
/* Extract H3 */
|
||||||
SystemString h3Path = path + _S("/h3.bin");
|
SystemString h3Path = basePath + _S("/h3.bin");
|
||||||
if (ctx.force || Stat(h3Path.c_str(), &theStat))
|
if (ctx.force || Stat(h3Path.c_str(), &theStat))
|
||||||
{
|
{
|
||||||
if (ctx.progressCB)
|
if (ctx.progressCB)
|
||||||
|
@ -1022,7 +1022,7 @@ public:
|
||||||
SystemString basePath = dirStr + _S("/") + getKindString(m_kind);
|
SystemString basePath = dirStr + _S("/") + getKindString(m_kind);
|
||||||
|
|
||||||
/* Check Ticket */
|
/* Check Ticket */
|
||||||
SystemString ticketIn = dirStr + _S("/ticket.bin");
|
SystemString ticketIn = basePath + _S("/ticket.bin");
|
||||||
Sstat theStat;
|
Sstat theStat;
|
||||||
if (Stat(ticketIn.c_str(), &theStat))
|
if (Stat(ticketIn.c_str(), &theStat))
|
||||||
{
|
{
|
||||||
|
@ -1031,7 +1031,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check TMD */
|
/* Check TMD */
|
||||||
SystemString tmdIn = dirStr + _S("/tmd.bin");
|
SystemString tmdIn = basePath + _S("/tmd.bin");
|
||||||
Sstat tmdStat;
|
Sstat tmdStat;
|
||||||
if (Stat(tmdIn.c_str(), &tmdStat))
|
if (Stat(tmdIn.c_str(), &tmdStat))
|
||||||
{
|
{
|
||||||
|
@ -1040,7 +1040,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check Cert */
|
/* Check Cert */
|
||||||
SystemString certIn = dirStr + _S("/cert.bin");
|
SystemString certIn = basePath + _S("/cert.bin");
|
||||||
Sstat certStat;
|
Sstat certStat;
|
||||||
if (Stat(certIn.c_str(), &certStat))
|
if (Stat(certIn.c_str(), &certStat))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue