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

isChildDocument(): Normalize paths before comparison #45

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

chenxiaolong
Copy link
Owner

Otherwise, duplicate and trailing slashes can result in an incorrect return value, which breaks apps that perform URI manipulation instead of using URIs returned by SAF.

This commit partially reverts 78cf92a also. If the parent and child refer to the same path, isChildDocuments() will now return true. This is counter to what the SAF documentation says, but AOSP's FileSystemProvider behaves this way and apps now rely on that behavior.

Fixes: #44

Otherwise, duplicate and trailing slashes can result in an incorrect
return value, which breaks apps that perform URI manipulation instead of
using URIs returned by SAF.

This commit partially reverts 78cf92a
also. If the parent and child refer to the same path, isChildDocuments()
will now return true. This is counter to what the SAF documentation
says, but AOSP's FileSystemProvider behaves this way and apps now rely
on that behavior.

Fixes: #44

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong self-assigned this Dec 22, 2023
@chenxiaolong chenxiaolong merged commit 0d3077c into master Dec 22, 2023
@chenxiaolong chenxiaolong deleted the normalize branch December 22, 2023 03:24
chenxiaolong added a commit that referenced this pull request Dec 22, 2023
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
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.

[Issue] Some applications cannot use RSAF provider as datasource
1 participant