|
@@ -288,6 +288,11 @@ public class GodotIO {
|
|
|
|
|
|
try {
|
|
try {
|
|
ad.files = am.list(path);
|
|
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) {
|
|
} catch (IOException e) {
|
|
|
|
|
|
System.out.printf("Exception on dir_open: %s\n",e);
|
|
System.out.printf("Exception on dir_open: %s\n",e);
|