mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +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!")
|
presentError("No item URL, cannot reload data!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
guard let kit else {
|
|
||||||
presentError("NextcloudKit instance is unavailable, cannot reload data!")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
guard let itemIdentifier = await withCheckedContinuation({
|
guard let itemIdentifier = await withCheckedContinuation({
|
||||||
(continuation: CheckedContinuation<NSFileProviderItemIdentifier?, Never>) -> Void in
|
(continuation: CheckedContinuation<NSFileProviderItemIdentifier?, Never>) -> Void in
|
||||||
NSFileProviderManager.getIdentifierForUserVisibleFile(
|
NSFileProviderManager.getIdentifierForUserVisibleFile(
|
||||||
|
@ -113,6 +109,10 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
|
||||||
presentError("Server does not support shares.")
|
presentError("Server does not support shares.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
guard let kit else {
|
||||||
|
presentError("NextcloudKit instance is unavailable, cannot reload data!")
|
||||||
|
return
|
||||||
|
}
|
||||||
itemMetadata = await fetchItemMetadata(itemRelativePath: serverPathString, kit: kit)
|
itemMetadata = await fetchItemMetadata(itemRelativePath: serverPathString, kit: kit)
|
||||||
guard itemMetadata?.permissions.contains("R") == true else {
|
guard itemMetadata?.permissions.contains("R") == true else {
|
||||||
presentError("This file cannot be shared.")
|
presentError("This file cannot be shared.")
|
||||||
|
|
Loading…
Reference in a new issue