Skip to content

Commit

Permalink
AssetManager: Use directory name without trailing slash when calling …
Browse files Browse the repository at this point in the history
…AssetManager.list()

It seems that earlier version of Android (probably Android 8) returns empty files if the
passed path in AssetManager.list() contains trailing slash.
  • Loading branch information
MikuAuahDark committed Jan 18, 2022
1 parent 2cd3d31 commit 612a0d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions love/src/main/java/org/love2d/android/GameActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ private HashMap<String, Boolean> buildFileTree(AssetManager assetManager, String

// List files
try {
list = assetManager.list(dir);
list = assetManager.list(strippedDir);
} catch (IOException e2) {
Log.e("GameActivity", dir, e2);
Log.e("GameActivity", strippedDir, e2);
}

// Mark as file
Expand Down

0 comments on commit 612a0d0

Please sign in to comment.