fix: fall back on dirent filename when all route fails on Android (#5484)

This commit is contained in:
lucas150670
2026-01-10 17:54:54 +08:00
committed by GitHub
parent 5b0a799769
commit 8de88c71da

View File

@ -473,7 +473,9 @@ FILE *android_fopen(const char *fileName, const char *mode)
{
#undef fopen
// Just do a regular open if file is not found in the assets
return fopen(TextFormat("%s/%s", internalDataPath, fileName), mode);
if(fopen(TextFormat("%s/%s", internalDataPath, fileName), mode) == NULL) {
return fopen(fileName, mode);
}
#define fopen(name, mode) android_fopen(name, mode)
}
}