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 loss of filename extension due to DocumentFile.renameTo() #259

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

chenxiaolong
Copy link
Owner

When DocumentFile.renameTo() is called on a SAF URI, the file extension is preserved, but this is not the case for file URIs. This commit introduces an extension method .renameToPreserveExt() that behaves the same regardless of URI.

@chenxiaolong chenxiaolong self-assigned this Feb 24, 2023
When DocumentFile.renameTo() is called on a SAF URI, the file extension
is preserved, but this is not the case for file URIs. This commit
introduces an extension method .renameToPreserveExt() that behaves the
same regardless of URI.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong merged commit f681032 into master Feb 24, 2023
@chenxiaolong chenxiaolong deleted the renameto branch February 24, 2023 21:26
chenxiaolong added a commit that referenced this pull request Feb 24, 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.

1 participant