-
Notifications
You must be signed in to change notification settings - Fork 4
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
Directory detection always returns true. #3
Comments
Hey, I just tested this behaviour via the sample app & I don't see |
I do see this on a Pixel 5 device with Android 13. I am using the ActivityResultContracts.OpenDocumentTree() to open the directory picker. The returned uris for a directory looking as follows:
Only the first and second uri are folders. But all uris do start with tree in the path. I tried your code in my open source app: https://gitlab.com/compose1/WTFOsd/-/blob/master/app/src/main/java/de/appsonair/wtf/osdplayer/ui/folder_tree_model.kt |
I can confirm this bug returning files as directory due to Will push a fix to address this issue. |
The latest version |
Hey great work with this alternative to DocumentFile. For my current project i can not use the original one because it is way too slow.
I found one bug. The function ResolverCompat.isTreeUri() (in file ResolverCompat.kt:101) does not work anymore. It always returns true. So all files declared as directory. For me it works fine when i only use the mime type to decide if it is a directory.
The text was updated successfully, but these errors were encountered: