Hello,
In my FinderSync extension, I update file badges with the following instruction, but the Finder doesn't (always) refresh them.
[[FIFinderSyncController defaultController] setBadgeIdentifier:result forURL:[NSURL fileURLWithPath:normalizedPath]];
I tried without success to force the refresh with:
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:path];
NSString *source = [NSString stringWithFormat:@"tell application \"Finder\" to update item (POSIX file \"%@\")", path];
NSAppleScript *appleScript = [[NSAppleScript alloc] initWithSource:source];
if (appleScript != nil) {
[appleScript executeAndReturnError:nil];
}
Hiding then showing the files (chflags) doesn't work better.
I'm in macOs Big Sur.
Any idea to get around this bug?
Thank you.
Chris
In my FinderSync extension, I update file badges with the following instruction, but the Finder doesn't (always) refresh them.
[[FIFinderSyncController defaultController] setBadgeIdentifier:result forURL:[NSURL fileURLWithPath:normalizedPath]];
I tried without success to force the refresh with:
[[NSWorkspace sharedWorkspace] noteFileSystemChanged:path];
NSString *source = [NSString stringWithFormat:@"tell application \"Finder\" to update item (POSIX file \"%@\")", path];
NSAppleScript *appleScript = [[NSAppleScript alloc] initWithSource:source];
if (appleScript != nil) {
[appleScript executeAndReturnError:nil];
}
Hiding then showing the files (chflags) doesn't work better.
I'm in macOs Big Sur.
Any idea to get around this bug?
Thank you.
Chris