Skip to content

Commit 6408344

Browse files
committed
Fix checkQuarantineRemoved
The command `xattr -p com.apple.quarantine '\(path)’` outputs directly the contents of the quarantine attribute (and the message “No such xattr: com.apple.quarantine” in `standardError`) or a null string when it has been removed. `checkQuarantineRemoved` should be therefore return `out.standardOutput.isEmpty`.
1 parent d1b57b6 commit 6408344

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sentinel/Utilities/CmdDrops.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func CmdRunDrop(cmd: String, path: String, type: cmdType, sudo: Bool = false, ap
123123

124124
func checkQuarantineRemoved(path: String) async -> Bool {
125125
let out = runShCommand("xattr -p com.apple.quarantine '\(path)'")
126-
return !out.standardOutput.contains("com.apple.quarantine")
126+
return out.standardOutput.isEmpty
127127
}
128128

129129
func checkAppSigned(path: String) async -> Bool {

0 commit comments

Comments
 (0)