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) Use decoded path when querying file list in directory via assetManager #542

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jhlee8804
Copy link

@jhlee8804 jhlee8804 commented Oct 20, 2022

Platforms affected

Android

Motivation and Context

The problem is that subfiles and folders cannot be listed via the assetManager.list function
if the folder name has special characters like @havesource.

# Folder Tree
www/plugins/@havesource/
  ㄴ cordova-plugin-push
      ㄴ www
          ㄴpush.js

image

Description

The AssetManager.list function does not automatically decode the passed paths that are encoded.
So if the folder name has special characters (such as @), it can't listing subfolders and files.

Testing

We need to pass the decoded path to the assetManager.list function.
Then the assetManager.list function returns a list of subfolders and files successfully.

image

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

…ssetManager

The AssetManager.list function does not automatically decode the passed paths that are encoded.
So if the folder name has special characters (such as @), it can't listing subfolders and files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant