mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 12:35:52 +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
7ae9f833aa
commit
f3e341c860
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