Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] FileUtils::listFiles implementation that works with empty folders #2463

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

rh101
Copy link
Contributor

@rh101 rh101 commented Mar 17, 2025

Describe your changes

This is an attempt to fix the issue of empty folder names missing from FileUtils::listFiles() on Android when the path is in the assets folder (within the APK).

This now uses the Java implementation of AssetManager.list(), which does return all file and folder names. This will then use
AssetManager.open() to check if the path is a file or folder, but if anyone knows of a better way to handle this, then please state what it is.

Files in the assets folder will be relative to that folder, and the "assets/" prefix will not be added to them, since it is not required.

Issue ticket number and link

#2458

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

@halx99 halx99 added this to the 2.5.0 milestone Mar 18, 2025
@halx99 halx99 added the enhancement New feature or request label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants