summaryrefslogtreecommitdiff
path: root/platform/android/java/src
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2016-11-04 00:41:16 +0900
committervolzhs <volzhs@gmail.com>2016-11-09 01:50:00 +0900
commit8d454ed9a7105bf1a4c19c238a0e904f220c1bb5 (patch)
treee04c63ccb94d390820eeed01e324143c58565f56 /platform/android/java/src
parent0cc8a641ce09e2dcf6224e135280030727bd34a1 (diff)
Fix Directory.dir_exist/get_current_dir for 'res://' on Android
Fix #7014
Diffstat (limited to 'platform/android/java/src')
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotIO.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java
index 55e330924a..128a9b2f7b 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java
@@ -288,6 +288,11 @@ public class GodotIO {
try {
ad.files = am.list(path);
+ // no way to find path is directory or file exactly.
+ // but if ad.files.length==0, then it's an empty directory or file.
+ if (ad.files.length==0) {
+ return -1;
+ }
} catch (IOException e) {
System.out.printf("Exception on dir_open: %s\n",e);