Skip to content

Commit

Permalink
Android: Fix exists test in AssetUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry committed Jul 2, 2014
1 parent 35dfa78 commit a217a2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builds/android/src/org/easyrpg/player/AssetUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ private static void copyFile(InputStream in, OutputStream out) throws IOExceptio

public static boolean exists(AssetManager assetManager, String source) {
try {
assetManager.list(source);
String[] s = assetManager.list(source);
if (s == null || s.length == 0) {
return false;
}

return true;
} catch (IOException e) {
return false;
Expand Down

0 comments on commit a217a2b

Please sign in to comment.