From f6683c532bd556111683e8a380a8304a9a8775ea Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 19 Nov 2018 15:16:28 +0200 Subject: loader: fix obb injection --- src/loader.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/loader.c b/src/loader.c index 8706f23..02dce84 100644 --- a/src/loader.c +++ b/src/loader.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -132,6 +133,9 @@ run_jni_game(struct jvm *jvm) const char *obb_dir = getenv("ANDROID_EXTERNAL_OBB_DIR"); if (obb_dir && (dir = opendir(obb_dir))) { for (struct dirent *d; (d = readdir(dir));) { + if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) + continue; + char path[4096]; snprintf(path, sizeof(path), "%s/%s", obb_dir, d->d_name); unity.native_file.fun(&jvm->env, context, jvm->env->NewStringUTF(&jvm->env, path)); -- cgit v1.2.3-70-g09d2