Keep the existing grant when the folder picker is dismissed - #221
Merged
Merged
Conversation
Dismissing the folder picker threw invalidFileSelected. During a Messages upgrade from a file grant, that error reached the service toggle and turned Messages off, although the old grant still worked and the alert's Cancel button already kept it. The picker now returns nil on dismissal; Messages keeps the old grant during an upgrade and otherwise reports userDeclinedAccess, and Phone reports the same instead of a wrong selection. The once-per-launch warning about a file-only Messages grant was a plain check-and-set on a shared flag that concurrent tool calls could race. It is now guarded by a lock, with the log call outside it.
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.
Follow-up to #198 and #220, addressing the review feedback on #198.
Dismissing the folder picker threw
invalidFileSelected. When Messages offered the upgrade from achat.dbgrant to the Messages folder, that error reached the service toggle and switched Messages off, although the old grant still worked and the alert's own Cancel button already kept it. The picker now returns nil when the panel is dismissed. Messages keeps the old grant during an upgrade and otherwise reportsuserDeclinedAccess; Phone reports the same instead of claiming a wrong selection.invalidFileSelectedis left for a selection that is not the expected folder, which the panel delegate already prevents.The once-per-launch warning about a file-only Messages grant was a plain check-and-set on a shared flag, and concurrent
messages_fetchcalls could race on it. It is now guarded by anOSAllocatedUnfairLock, with the log call outside the lock. Phone logs its warning right before prompting and has no shared state, so it needed no change there.