Only display CIA info if successfully obtained.

This commit is contained in:
Steven Smith 2015-08-19 15:56:24 -07:00
parent 558ace6bc5
commit 854766b04d

View File

@ -287,8 +287,7 @@ void uiGetDirContents(std::vector<SelectableElement> &elements, const std::strin
std::string extension = fs::extension(path);
if(extension.compare("cia") == 0) {
app::App app;
app::ciaInfo(&app, path, fs::SD);
if(app::ciaInfo(&app, path, fs::SD) == app::APP_SUCCESS) {
std::stringstream titleId;
titleId << "0x" << std::setfill('0') << std::setw(16) << std::hex << app.titleId;
@ -309,6 +308,7 @@ void uiGetDirContents(std::vector<SelectableElement> &elements, const std::strin
info.push_back("Category: " + app::categoryString(app.category));
info.push_back("Version: " + version.str());
}
}
elements.push_back({path, name, info});
}