ammarahm-ed / react-native-scoped-storage

MIT License
58 stars 10 forks source link

Running listFiles on a subdirectory uri creates a new folder #5

Closed rembo10 closed 3 years ago

rembo10 commented 3 years ago

Hi.... I really like your library even through I'm running into a little issue. If I run listFiles on a document tree that I selected, and then run listFiles on one of the subdirectories that were returned, it seems to create a directory in the root document tree, instead of listing the files.

For example, I have a /sdcard/Bills directory. When I run openDocumentTree, and select that directory, it returns: [{"lastModified": 1630735526000, "name": "Pending", "type": "directory", "uri": "content://com.android.externalstorage.documents/tree/primary%3Abills/document/primary%3ABills%2FPending"}]

If I run listFiles on that uri.... it creates an empty directory: /sdcard/bills/document/primary%3ABills%2FPending/

Is this a problem with my document picker? It's Files by Google v1.0.389363820

Thanks for the help

ammarahm-ed commented 3 years ago

Hey, thanks for reporting. I have fixed the issue. Can you try again using the master branch:

yarn add https://github.com/ammarahm-ed/react-native-scoped-storage.git

Let me know soon after so I can ship the fix inv1.4.0

rembo10 commented 3 years ago

Wow, thanks for the fast reply. That seems to have done it! Thanks so much! I was using react-native-document-picker and react-native-fs before but I much prefer using this.