Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
- (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