Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/gui/macOS/fileproviderdomainmanager_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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: "
Expand Down
Loading