From a295cf59e47176968d595719e996f12ba5835260 Mon Sep 17 00:00:00 2001 From: Iva Horn Date: Wed, 14 Jan 2026 09:13:18 +0100 Subject: [PATCH] fix(file-provider): Trash enumerates only locally trashed items. Signed-off-by: Iva Horn --- .../FileProviderExt/FileProviderExtension.swift | 14 ++++---------- .../xcshareddata/swiftpm/Package.resolved | 12 ++++++------ src/gui/macOS/fileproviderdomainmanager_mac.mm | 7 +++++++ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift index 0fbba0422083c..1d43905b91733 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension.swift @@ -139,21 +139,15 @@ import OSLog } let progress = Progress() + Task { progress.totalUnitCount = 1 - if let item = await Item.storedItem( - identifier: identifier, - account: ncAccount, - remoteInterface: ncKit, - dbManager: dbManager, - log: log - ) { + + if let item = await Item.storedItem(identifier: identifier, account: ncAccount, remoteInterface: ncKit, dbManager: dbManager, log: log) { progress.completedUnitCount = 1 completionHandler(item, nil) } else { - completionHandler( - nil, NSError.fileProviderErrorForNonExistentItem(withIdentifier: identifier) - ) + completionHandler(nil, NSError.fileProviderErrorForNonExistentItem(withIdentifier: identifier)) } } return progress diff --git a/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 76d1b3474197f..f3e1f4ee3e50f 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire", "state" : { - "revision" : "513364f870f6bfc468f9d2ff0a95caccc10044c5", - "version" : "5.10.2" + "revision" : "7be73f6c2b5cd90e40798b06ebd5da8f9f79cf88", + "version" : "5.11.0" } }, { @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/nextcloud/NextcloudFileProviderKit.git", "state" : { - "revision" : "3ff19ffdda3361ec3446266aa757653a8b272898", - "version" : "3.2.11" + "revision" : "53a3aad196432d5cef83df81c58bed98d3f78d62", + "version" : "3.2.12" } }, { @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/nextcloud/NextcloudKit", "state" : { - "revision" : "67f3cf59a5e6ae11c061815a05197e2b2cbcb3ad", - "version" : "7.2.2" + "revision" : "8ac6f9e08d112b51a9b7a7189fa144009a6f382d", + "version" : "7.2.3" } }, { diff --git a/src/gui/macOS/fileproviderdomainmanager_mac.mm b/src/gui/macOS/fileproviderdomainmanager_mac.mm index 17baba9f308a0..fb78dcd0184eb 100644 --- a/src/gui/macOS/fileproviderdomainmanager_mac.mm +++ b/src/gui/macOS/fileproviderdomainmanager_mac.mm @@ -347,6 +347,13 @@ void addFileProviderDomain(const AccountState * const accountState) NSFileProviderDomain * const fileProviderDomain = [[NSFileProviderDomain alloc] initWithIdentifier:domainId.toNSString() displayName:domainDisplayName.toNSString()]; + if (@available(macOS 13.0, *)) { + // supportsSyncingTrash is only available on macOS 13 and later. + // The trash is a server feature of which the availability can change any time. + // Its availability is checked on demand by the file provider extension itself. + fileProviderDomain.supportsSyncingTrash = YES; + } + [NSFileProviderManager addDomain:fileProviderDomain completionHandler:^(NSError * const error) { if(error) { qCWarning(lcMacFileProviderDomainManager) << "Error adding file provider domain: "