file_sys: tolerate empty NCA
This commit is contained in:
parent
50eee9b218
commit
775bf8e215
|
@ -185,7 +185,7 @@ u32 XCI::GetSystemUpdateVersion() {
|
||||||
for (const auto& update_file : update->GetFiles()) {
|
for (const auto& update_file : update->GetFiles()) {
|
||||||
NCA nca{update_file};
|
NCA nca{update_file};
|
||||||
|
|
||||||
if (nca.GetStatus() != Loader::ResultStatus::Success) {
|
if (nca.GetStatus() != Loader::ResultStatus::Success || nca.GetSubdirectories().empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,7 +418,7 @@ void RegisteredCache::ProcessFiles(const std::vector<NcaID>& ids) {
|
||||||
continue;
|
continue;
|
||||||
const auto nca = std::make_shared<NCA>(parser(file, id));
|
const auto nca = std::make_shared<NCA>(parser(file, id));
|
||||||
if (nca->GetStatus() != Loader::ResultStatus::Success ||
|
if (nca->GetStatus() != Loader::ResultStatus::Success ||
|
||||||
nca->GetType() != NCAContentType::Meta) {
|
nca->GetType() != NCAContentType::Meta || nca->GetSubdirectories().empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ void NSP::ReadNCAs(const std::vector<VirtualFile>& files) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto nca = std::make_shared<NCA>(outer_file);
|
const auto nca = std::make_shared<NCA>(outer_file);
|
||||||
if (nca->GetStatus() != Loader::ResultStatus::Success) {
|
if (nca->GetStatus() != Loader::ResultStatus::Success || nca->GetSubdirectories().empty()) {
|
||||||
program_status[nca->GetTitleId()] = nca->GetStatus();
|
program_status[nca->GetTitleId()] = nca->GetStatus();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue