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

storage.List doesn't return complete URI on Android for "content:" scheme #2619

Closed
lugu opened this issue Nov 4, 2021 · 1 comment
Closed
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@lugu
Copy link
Contributor

lugu commented Nov 4, 2021

When trying to list the child of an URI (i.e. the content of the directory) which has the content: scheme on Android, the child URI are truncated.

In my case the file picker returns a directory the URI :

content://com.android.externalstorage.documents/tree/primary:Android/media/Cards

And when listing the file within this directory with storage.List(), the children are missing half of their URI like

primary:Android/media/Cards/test.md

Instead of

content://com.android.externalstorage.documents/tree/primary:Android/media/Cards/test.md

Device (please complete the following information):

  • OS: Android
  • Version: 10
  • **Go version:**1.16.9
  • Fyne version: master, develop
@lugu lugu added the unverified A bug that has been reported but not verified label Nov 4, 2021
lugu added a commit to lugu/fyne that referenced this issue Nov 5, 2021
…on Android

The current implementation only returns the DOCUMENT_ID instead of the
full URI. Build the child URI using buildDocumentUriUsingTree.

See https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)

Fixes fyne-io#2619
lugu added a commit to lugu/fyne that referenced this issue Nov 5, 2021
…on Android

The current implementation only returns the DOCUMENT_ID instead of the
full URI. Build the child URI using buildDocumentUriUsingTree.

See https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)

Fixes fyne-io#2619
@andydotxyz andydotxyz added blocker Items that would block a forthcoming release bug Something isn't working and removed unverified A bug that has been reported but not verified labels Nov 8, 2021
@andydotxyz andydotxyz added this to the Fixes (v2.1.x) milestone Nov 8, 2021
@andydotxyz
Copy link
Member

Resolved on develop and will be merged to release branch before v2.1.2

andydotxyz pushed a commit to andydotxyz/fyne that referenced this issue Nov 15, 2021
…on Android

The current implementation only returns the DOCUMENT_ID instead of the
full URI. Build the child URI using buildDocumentUriUsingTree.

See https://developer.android.com/reference/android/provider/DocumentsContract#buildDocumentUriUsingTree(android.net.Uri,%20java.lang.String)

Fixes fyne-io#2619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants