mirror of
https://github.com/hax4dazy/TinWoo.git
synced 2025-02-09 19:25:05 +01:00
added cert logic
This commit is contained in:
parent
0901c78d34
commit
effbc835c8
@ -83,14 +83,18 @@ namespace tin::install::nsp
|
||||
{
|
||||
const PFS0FileEntry* fileEntry = this->GetFileEntry(i);
|
||||
std::string name(this->GetFileEntryName(fileEntry));
|
||||
|
||||
auto foundExtension = name.substr(name.find(".") + 1);
|
||||
|
||||
// fix cert filname extension becoming corrupted when xcz/nsz is installing certs/ticks.
|
||||
int pos = 0;
|
||||
std::string mystr = name;
|
||||
pos = mystr.find_last_of('.');
|
||||
mystr = mystr.substr(5, pos);
|
||||
//auto foundExtension = name.substr(name.find(".") + 1);
|
||||
auto foundExtension = mystr.substr(mystr.find(".") + 1);
|
||||
std::string cert ("cert");
|
||||
std::size_t found = name.find(cert);
|
||||
if (found!=std::string::npos){
|
||||
int pos = 0;
|
||||
std::string mystr = name;
|
||||
pos = mystr.find_last_of('.');
|
||||
mystr = mystr.substr(5, pos);
|
||||
foundExtension = mystr.substr(mystr.find(".") + 1);
|
||||
}
|
||||
|
||||
if (foundExtension == extension)
|
||||
entryList.push_back(fileEntry);
|
||||
|
@ -158,15 +158,19 @@ namespace tin::install::xci
|
||||
{
|
||||
const HFS0FileEntry* fileEntry = this->GetFileEntry(i);
|
||||
std::string name(this->GetFileEntryName(fileEntry));
|
||||
|
||||
auto foundExtension = name.substr(name.find(".") + 1);
|
||||
|
||||
// fix cert filname extension becoming corrupted when xcz/nsz is installing certs/ticks.
|
||||
int pos = 0;
|
||||
std::string mystr = name;
|
||||
pos = mystr.find_last_of('.');
|
||||
mystr = mystr.substr(5, pos);
|
||||
//auto foundExtension = name.substr(name.find(".") + 1);
|
||||
auto foundExtension = mystr.substr(mystr.find(".") + 1);
|
||||
|
||||
std::string cert ("cert");
|
||||
std::size_t found = name.find(cert);
|
||||
if (found!=std::string::npos){
|
||||
int pos = 0;
|
||||
std::string mystr = name;
|
||||
pos = mystr.find_last_of('.');
|
||||
mystr = mystr.substr(5, pos);
|
||||
foundExtension = mystr.substr(mystr.find(".") + 1);
|
||||
}
|
||||
|
||||
if (foundExtension == extension)
|
||||
entryList.push_back(fileEntry);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user