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

IOException caught for detecting directories is wrong (compressed assets) #346

Closed
jacargentina opened this issue Sep 21, 2017 · 0 comments
Closed

Comments

@jacargentina
Copy link
Contributor

I'm using readDirAssets on android, and was getting my text and pdf files as directories! ie. x.isDirectory() == true for a given pdf file

Problem seems to be that the assets are compressed by default. So when trying to do assetManager.openFd(path); on the RNFSManager.java file, an IOExceptionis raised with the message:

"This file can not be opened as a file descriptor; it is probably compressed"

There should be another way to detect folders than catching an exception?

itinance added a commit that referenced this issue Oct 4, 2017
Fix for #346: compressed file assets are detected as directories
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

No branches or pull requests

1 participant