fix: improve quarantine handling for applications outside standard folders#340
Open
duongductrong wants to merge 1 commit into
Open
fix: improve quarantine handling for applications outside standard folders#340duongductrong wants to merge 1 commit into
duongductrong wants to merge 1 commit into
Conversation
duongductrong
force-pushed
the
fix/quarantine-issue
branch
from
July 7, 2026 17:12
2c5aaff to
0c9d0ff
Compare
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.
Overview
This pull request resolves an issue where Snapzy incorrectly flags itself as quarantined and blocks permissions after being upgraded via Homebrew Cask (
brew upgrade).Problem
Homebrew Cask upgrades perform file operations (like moving or copying) using command-line tools that preserve the
com.apple.quarantineextended attribute on the application bundle. Even though Snapzy is Apple Notarized and macOS Gatekeeper handles the quarantine clearance automatically upon first launch, Snapzy'sAppIdentityManagerdetects the quarantine flag and treats it as a hard block. This results in a false positive that prevents the app from working, forcing users to completely uninstall and reinstall the app to clear the permissions lock after every upgrade (see #337).Solution
Modified the quarantine check logic in
AppIdentityManager.swift:/Applications/(System-wide applications)~/Applications/(User-specific applications)~/Downloads), the quarantine check remains active and behaves as expected.Key Changes
evaluate()in AppIdentityManager.swift:NSHomeDirectory()to resolve standard system/user application directories..outsideApplicationsand.quarantinedwarnings to only fire ifquarantinedis true AND the app is outside standard applications directories.Closes