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

Fix getDirectoryPath() #763

Merged
merged 3 commits into from
Jul 28, 2021
Merged

Fix getDirectoryPath() #763

merged 3 commits into from
Jul 28, 2021

Conversation

tomm1e
Copy link
Contributor

@tomm1e tomm1e commented Jul 5, 2021

Fixes #745

@miguelpruivo
Copy link
Owner

miguelpruivo commented Jul 7, 2021

This doesn't seem to solve when folders are inside Downloads directory, for example. They are still returning /.

@tomm1e
Copy link
Contributor Author

tomm1e commented Jul 7, 2021

I tested it on 11 emulator and 11 device they both return full paths for folders inside Download.

Untitled

Uninstall any old versions on the device and try a clean build off my fork with a new folder in Download.

@fsonntag
Copy link

fsonntag commented Jul 9, 2021

I tested it for folders inside and outside of Downloads and it fixes the issue!

Tested on a Google Pixel 4a.

@miguelpruivo
Copy link
Owner

I’ll have to give it a try next week before merging. Thank you.

@tomm1e
Copy link
Contributor Author

tomm1e commented Jul 20, 2021

@miguelpruivo I added the fallback for earlier versions. Tested 11 and 10 emulator both work now.

@miguelpruivo
Copy link
Owner

@tomm1e thank you. I'll give it a try tomorrow.

@miguelpruivo
Copy link
Owner

Gravacao.do.ecra.2021-07-26.as.16.39.16.mov

On SDK 29 it's not working, however, on SDK 30 it seems to be. Can you take a look why @tomm1e?

@tomm1e
Copy link
Contributor Author

tomm1e commented Jul 27, 2021

@miguelpruivo Added another fix for the Download folder on 29. Because of SAF, the Uri has a different type of document id depending on the situation.

@miguelpruivo
Copy link
Owner

Ok, seems to be working now! Thank you.

@miguelpruivo miguelpruivo merged commit bcea1c6 into miguelpruivo:master Jul 28, 2021
@miguelpruivo
Copy link
Owner

Published with 3.0.4. 🎉

@ujwalbasnet1
Copy link

got the issue on file_picker: ^5.2.10
android 12, GM1913, OnePlus 7T
image
FileSystemException: Directory listing failed, path = '/' (OS Error: Permission denied, errno = 13)

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.

getDirectoryPath() doesn't work in example app on Android 11 (OnePlus)
4 participants