fix(plugins): register all SQLite file extensions end-to-end (#1327)#1331
Merged
Conversation
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.
Summary
Closes #1327 (
.dbnot registered as SQLite document type — Finder "Open With" grays out TablePro).The reported gap was
.db, but auditing the codebase surfaced the opposite-direction gap as well: TablePro'sInfo.plistand the SQLite plugin had different SQLite extension lists, and neither was a superset of the other.Info.plist(CFBundleDocumentTypes + UTExportedTypeDeclarations)sqlite, sqlite3, db3, s3db, sl3, sqlitedbSQLitePlugin.swift+PluginMetadataRegistrydb, sqlite, sqlite3Two real bugs from this mismatch:
.dbfiles missing fromInfo.plist→ Finder "Open With" grays out TablePro (the reported issue)..db3/.s3db/.sl3/.sqlitedbfiles claimed byInfo.plistbut not registered in the plugin's extension map →URLClassifier.swift:37returnsnilfromclassifyFile(...), so double-clicking these files in Finder launches TablePro but silently fails to open them. This was a latent bug nobody had reported yet.Fix: pick the union in all four locations:
db, db3, s3db, sl3, sqlite, sqlite3, sqlitedb. Plus mobile parity.Files changed
TablePro/Info.plist— addeddbtoCFBundleDocumentTypesandUTExportedTypeDeclarations(the second one is what tells Launch Services TablePro can handle the type)Plugins/SQLiteDriverPlugin/SQLitePlugin.swift— extension list now["db", "db3", "s3db", "sl3", "sqlite", "sqlite3", "sqlitedb"]TablePro/Core/Plugins/PluginMetadataRegistry.swift— same list, the registry's runtime map forURLClassifierTableProMobile/.../ConnectionFormView.swift— file picker now allows all 7 extensions instead of hardcodingsqlite3onlyCHANGELOG.md— one Fixed entry under UnreleasedVerification
Test plan
.dbextension (e.g., the Chinook sample). Right-click in Finder → Open With → TablePro is offered, not grayed out..db3,.s3db,.sl3,.sqlitedbfiles..sqlite/.sqlite3worked reliably)..dbfiles are now selectable.