Search for .rpx in /code/ for .wuhb files

This commit is contained in:
Maschell 2021-01-09 21:23:33 +01:00
parent ff35dc23cc
commit e09a655485

View File

@ -171,7 +171,7 @@ int32_t getRPXInfoForPath(const std::string &path, romfs_fileInfo *info) {
DIR *dir; DIR *dir;
struct dirent *entry; struct dirent *entry;
if (!(dir = opendir("rcc:/"))) { if (!(dir = opendir("rcc:/code/"))) {
romfsUnmount("rcc"); romfsUnmount("rcc");
return -2; return -2;
} }
@ -180,9 +180,11 @@ int32_t getRPXInfoForPath(const std::string &path, romfs_fileInfo *info) {
while ((entry = readdir(dir)) != nullptr) { while ((entry = readdir(dir)) != nullptr) {
DEBUG_FUNCTION_LINE("%s", entry->d_name); DEBUG_FUNCTION_LINE("%s", entry->d_name);
if (StringTools::EndsWith(entry->d_name, ".rpx")) { if (StringTools::EndsWith(entry->d_name, ".rpx")) {
if (romfsGetFileInfoPerPath("rcc", entry->d_name, info) >= 0) { if (romfsGetFileInfoPerPath("rcc", (std::string("code/") + entry->d_name).c_str(), info) >= 0) {
found = true; found = true;
res = 0; res = 0;
}else{
DEBUG_FUNCTION_LINE("Failed to get info for %s", entry->d_name);
} }
break; break;
} }