From: Claudio Cambra Date: Tue, 16 Apr 2024 13:27:47 +0000 (+0800) Subject: Always signal enumerator after errors to try and recover from what the error might... X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~7^2~45^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=448478161c026d8926ee5c02f647fd13d6150220;p=nextcloud-desktop.git Always signal enumerator after errors to try and recover from what the error might have been Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift index 950f9b9b4..1ee6476a3 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift @@ -202,6 +202,9 @@ import OSLog ncAccount: ncAccount, progress: progress ) + if error != nil { + signalEnumerator(completionHandler: { _ in }) + } completionHandler( item ?? itemTemplate, NSFileProviderItemFields(), @@ -264,6 +267,9 @@ import OSLog domain: domain, progress: progress ) + if error != nil { + signalEnumerator(completionHandler: { _ in }) + } completionHandler(modifiedItem ?? item, [], false, error) } return progress @@ -299,8 +305,12 @@ import OSLog let progress = Progress(totalUnitCount: 1) Task { - completionHandler(await item.delete()) + let error = await item.delete() + if error != nil { + signalEnumerator(completionHandler: { _ in }) + } progress.completedUnitCount = 1 + completionHandler(await item.delete()) } return progress }