fix: detect Full Disk Access on macOS 27 without user TCC.db - #41
Open
AltFl0w wants to merge 1 commit into
Open
Conversation
On macOS 27 the user TCC database no longer lives at ~/Library/Application Support/com.apple.TCC/TCC.db, so fileExists always failed and onboarding stayed on "Not enabled yet". Probe a real read of the system TCC database first, then fall back to listing protected app-data directories. Missing paths are skipped instead of treated as denial. Fixes bysiber#40
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.
Fixes #40
macOS 27 moved the user TCC database out of
~/Library/Application Support/com.apple.TCC/TCC.db. ClearDisk 2.3.1 usedfileExistson that path as the Full Disk Access probe, so onboarding stayed on Not enabled yet after the user enabled the app in System Settings.This changes the probe to a real capability check:
/Library/Application Support/com.apple.TCC/TCC.dbwhen it exists (SQLite header required).contentsOfDirectoryon protected locations ClearDisk actually scans (~/Library/Safari,~/Library/Mail,~/Library/Containers/com.apple.stocks).Verified on macOS 27.0 (26A5425a): the user TCC path is missing, the system TCC database still exists, and a directory listing of Safari/Mail/Stocks succeeds after Full Disk Access is granted.