Skip to content

Commit

Permalink
Do not set badge identifier for a given path URL if the URL is nil
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Oct 29, 2024
1 parent b65acb0 commit 57ea2e4
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,12 @@ - (void)subMenuActionClicked:(id)sender {

- (void)setResult:(NSString *)result forPath:(NSString*)path
{
NSString *normalizedPath = [path decomposedStringWithCanonicalMapping];
[[FIFinderSyncController defaultController] setBadgeIdentifier:result forURL:[NSURL fileURLWithPath:normalizedPath]];
NSString *const normalizedPath = path.decomposedStringWithCanonicalMapping;
NSURL *const urlForPath = [NSURL fileURLWithPath:normalizedPath];
if (urlForPath == nil) {
return;
}
[FIFinderSyncController.defaultController setBadgeIdentifier:result forURL:urlForPath];
}

- (void)reFetchFileNameCacheForPath:(NSString*)path
Expand Down

0 comments on commit 57ea2e4

Please sign in to comment.