From: Claudio Cambra Date: Tue, 29 Oct 2024 09:31:59 +0000 (+0800) Subject: Do not set badge identifier for a given path URL if the URL is nil X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~41^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ffa0e55025a46655b6c7fde0325237a959ba93fe;p=nextcloud-desktop.git Do not set badge identifier for a given path URL if the URL is nil Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m index 822a2b639..c21c3a9ac 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m +++ b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m @@ -196,8 +196,12 @@ - (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