Open
Conversation
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to 9be7268 in 1 minute and 53 seconds. Click for details.
- Reviewed
52lines of code in2files - Skipped
0files when reviewing. - Skipped posting
1draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. android/src/main/kotlin/com/mr/flutter/plugin/filepicker/FilePickerDelegate.kt:74
- Draft comment:
Improved file saving now uses getFullPathFromTreeUri to return the actual file path. Ensure this handles all content provider cases reliably. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%The comment is asking the PR author to ensure that the new method handles all content provider cases reliably. This falls under the rule of not asking the author to ensure behavior is intended or tested. The comment does not provide a specific suggestion or point out a specific issue with the code.
Workflow ID: wflow_4f4xbzjhe7z29dUO
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| val fileName = getFileName(treeUri, con) | ||
| if (fileName != null) { | ||
| // Try to get the actual path from the URI | ||
| val cursor = con.contentResolver.query(treeUri, null, null, null, null) |
There was a problem hiding this comment.
The new block for content URIs queries the '_data' column to determine the file path. Consider specifying a projection (e.g. arrayOf("_data")) to optimize the query. Also note that '_data' may not be available on all content providers and a robust fallback is essential.
Suggested change
| val cursor = con.contentResolver.query(treeUri, null, null, null, null) | |
| val cursor = con.contentResolver.query(treeUri, arrayOf("_data"), null, null, null) |
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.
Important
Fixes file path retrieval in
FilePickerDelegate.ktby usingFileUtils.getFullPathFromTreeUri()to handle content URIs correctly.FilePickerDelegate.kt,saveFile()now usesFileUtils.getFullPathFromTreeUri()to get the correct file path from a URI, instead of usinguri.path.getFullPathFromTreeUri()to handle content URIs by querying the content resolver for the actual file path.getFullPathFromTreeUri().FileUtils.ktto handle exceptions during file path retrieval.This description was created by
for 9be7268. You can customize this summary. It will automatically update as commits are pushed.