Skip to content

Commit

Permalink
Signal enumeration of locked/unlocked file
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and mgallien committed Sep 12, 2024
1 parent bda7d45 commit 44f640a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,18 @@ class LockViewController: NSViewController {
accessibilityDescription: "checkmark.circle.fill"
)
stopIndicatingLoading()
if let manager = NSFileProviderManager(for: actionViewController.domain) {
do {
try await manager.signalEnumerator(for: itemIdentifier)
} catch let error {
presentError(
"""
Could not signal lock state change in virtual file.
Changes may take a while to be reflected on your Mac.
Error: \(error.localizedDescription)
""")
}
}
} else {
presentError("Could not lock file: \(error.errorDescription).")
}
Expand Down

0 comments on commit 44f640a

Please sign in to comment.