Offer for the older names of Word, Excel and PowerPoint files - #702
Merged
Merged
Conversation
Since STRICT_CATCH became the default, a .doc, .xls or .ppt that a mail or file app types as application/x-msword and the like no longer reaches the app. Claim those spellings in the manifest and in SupportedDocumentTypes, and map them to the names odrcore knows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AK12MgSt5U9MA7dQaCQyqU
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.
Since #479 (4.7) every upgrader runs on
STRICT_CATCH. It matches the core's own MIME spellings only, so a.doc,.xlsor.pptthat a mail or file app types asapplication/x-msword,application/x-msexceland similar no longer offers the app.CATCH_ALLcaught these through*/*.SupportedDocumentTypes.MIME_ALIASESnames 13 such spellings and maps each to one odrcore knows.canonicalMimeTypeapplies the map, andSTRICT_CATCHclaims the same spellings. The bytes still decide once the file is cached. vCards and other unrelated types stay out.A content URI with no type at all is still not claimed:
aFileWithNoMimeTypeAndAnUnrelatedExtensionReachesNobodykeeps that route shut on purpose.SupportedFormatsTestgetsanAliasSpellingReachesUs. All 8 tests pass on a Pixel 9 Pro emulator (Android 16).🤖 Generated with Claude Code