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 committed Aug 1, 2024
1 parent 6402246 commit 31996e8
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 31996e8

Please sign in to comment.