mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-05-06 16:26:34 +08:00
Ensure file ends with .cia before getting info.
This commit is contained in:
parent
48d3388c1b
commit
2476e6c59a
@ -79,6 +79,8 @@ static void task_populate_files_thread(void* arg) {
|
||||
if(R_SUCCEEDED(FSUSER_OpenFile(&fileHandle, *data->dir->archive, fsMakePath(PATH_ASCII, fileInfo->path), FS_OPEN_READ, 0))) {
|
||||
FSFILE_GetSize(fileHandle, &fileInfo->size);
|
||||
|
||||
size_t len = strlen(fileInfo->path);
|
||||
if(len > 4 && strcasecmp(&fileInfo->path[len - 4], ".cia") == 0) {
|
||||
AM_TitleEntry titleEntry;
|
||||
if(R_SUCCEEDED(AM_GetCiaFileInfo(MEDIATYPE_SD, &titleEntry, fileHandle))) {
|
||||
data->dir->containsCias = true;
|
||||
@ -110,6 +112,7 @@ static void task_populate_files_thread(void* arg) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FSFILE_Close(fileHandle);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user