mirror of
https://gitlab.com/Theopse/fbi-i18n-zh.git
synced 2025-08-24 15:29:46 +08:00
Set attributes to 0 if FSFILE_GetAttributes fails.
This commit is contained in:
parent
0c0e04aad6
commit
4eb7586237
@ -51,8 +51,8 @@ Result task_create_file_item(list_item** out, FS_Archive archive, const char* pa
|
|||||||
if(fileFsPath != NULL) {
|
if(fileFsPath != NULL) {
|
||||||
Handle fileHandle;
|
Handle fileHandle;
|
||||||
if(R_SUCCEEDED(FSUSER_OpenFile(&fileHandle, archive, *fileFsPath, FS_OPEN_READ, 0))) {
|
if(R_SUCCEEDED(FSUSER_OpenFile(&fileHandle, archive, *fileFsPath, FS_OPEN_READ, 0))) {
|
||||||
if(attributes == UINT32_MAX) {
|
if(attributes == UINT32_MAX && R_FAILED(FSFILE_GetAttributes(fileHandle, &fileInfo->attributes))) {
|
||||||
FSFILE_GetAttributes(fileHandle, &fileInfo->attributes);
|
fileInfo->attributes = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
FSFILE_GetSize(fileHandle, &fileInfo->size);
|
FSFILE_GetSize(fileHandle, &fileInfo->size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user