mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Make sure not to check for kit before we should in shares table view data source
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
bcbfdc942e
commit
8533fdd4a0
1 changed files with 4 additions and 4 deletions
|
@ -70,10 +70,6 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
|
|||
presentError("No item URL, cannot reload data!")
|
||||
return
|
||||
}
|
||||
guard let kit else {
|
||||
presentError("NextcloudKit instance is unavailable, cannot reload data!")
|
||||
return
|
||||
}
|
||||
guard let itemIdentifier = await withCheckedContinuation({
|
||||
(continuation: CheckedContinuation<NSFileProviderItemIdentifier?, Never>) -> Void in
|
||||
NSFileProviderManager.getIdentifierForUserVisibleFile(
|
||||
|
@ -113,6 +109,10 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
|
|||
presentError("Server does not support shares.")
|
||||
return
|
||||
}
|
||||
guard let kit else {
|
||||
presentError("NextcloudKit instance is unavailable, cannot reload data!")
|
||||
return
|
||||
}
|
||||
itemMetadata = await fetchItemMetadata(itemRelativePath: serverPathString, kit: kit)
|
||||
guard itemMetadata?.permissions.contains("R") == true else {
|
||||
presentError("This file cannot be shared.")
|
||||
|
|
Loading…
Reference in a new issue