fix: accept Android document-provider export paths - #831
Open
jpdexter101-lang wants to merge 1 commit into
Open
Conversation
Owner
Not a 2.2.0 blocker, and one note if you do land itReviewed in a release-readiness audit before #988. The defect is real and somewhat broader than the description says — the false failure is not limited to the path shape the title names. It is a good fix. It is not a release gate, though: it affects export rather than anything 2.2.0 introduces, and users hitting it have been hitting it since before v2.0.2. If you do want it in: it is small (2 files, no |
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
Fixes #763.
On Android,
file_picker11 writes through the selected Storage Access Frameworkcontent://URI, then returnsuri.path. That value looks like/document/primary:Download/...but is not a realdart:iofilesystem path. When Downloads auto-renames an existing export to(2).zip, the export verifier tries to stat the provider path and reports a valid export as failed.This change treats Android document-provider paths the same as
content://URIs while retaining strict byte-length verification for real filesystem paths.Verification
dart format lib/core/utils/export_write_verifier.dart test/unit_test/export_write_verifier_test.dartflutter test test/unit_test/export_write_verifier_test.dart— 7 tests passedgit diff --check— passedflutter analyzewas attempted, but the checkout is missing the repository'slib/generated/l10n.dartlocalization output and reports broad pre-existing generated-code errors; the focused test suite passes.