diff options
Diffstat (limited to 'platform/android/file_access_jandroid.cpp')
-rw-r--r-- | platform/android/file_access_jandroid.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp index e1dec4f601..be38d806b2 100644 --- a/platform/android/file_access_jandroid.cpp +++ b/platform/android/file_access_jandroid.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -62,14 +62,15 @@ Error FileAccessJAndroid::_open(const String& p_path, int p_mode_flags) { JNIEnv *env = ThreadAndroid::get_env(); - //OS::get_singleton()->print("env: %p, io %p, fo: %p\n",env,io,_file_open); jstring js = env->NewStringUTF(path.utf8().get_data()); int res = env->CallIntMethod(io,_file_open,js,p_mode_flags&WRITE?true:false); - env->DeleteLocalRef(js); + OS::get_singleton()->print("fopen: '%s' ret %i\n",path.utf8().get_data(),res); + + if (res<=0) return ERR_FILE_CANT_OPEN; id=res; |