Skip to content

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

@jacargentina

Description

@jacargentina

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions