mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Prevent creation of symbolic link items in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ca298eff87
commit
53d2fc0c1e
1 changed files with 6 additions and 0 deletions
|
@ -203,6 +203,12 @@ class FileProviderExtension: NSObject, NSFileProviderReplicatedExtension, NKComm
|
|||
|
||||
NSLog("Received create item request for item with identifier: %@ and filename: %@", itemTemplate.itemIdentifier.rawValue, itemTemplate.filename)
|
||||
|
||||
guard itemTemplate.contentType != .symbolicLink else {
|
||||
NSLog("Cannot create item, symbolic links not supported.")
|
||||
completionHandler(itemTemplate, NSFileProviderItemFields(), false, NSError(domain: NSCocoaErrorDomain, code: NSFeatureUnsupportedError, userInfo:[:]))
|
||||
return Progress()
|
||||
}
|
||||
|
||||
guard let ncAccount = ncAccount else {
|
||||
NSLog("Not creating item: %@ as account not set up yet", itemTemplate.itemIdentifier.rawValue)
|
||||
completionHandler(itemTemplate, NSFileProviderItemFields(), false, NSFileProviderError(.notAuthenticated))
|
||||
|
|
Loading…
Reference in a new issue