瀏覽代碼

fix: fall back on dirent filename when all route fails on Android

pull/5484/head
lucas150670 1 月之前
父節點
當前提交
44d1cc3e4a
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      src/utils.c

+ 3
- 1
src/utils.c 查看文件

@ -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)
}
}

Loading…
取消
儲存