mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Fix file lock server url in lockviewcontroller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f3e341c860
commit
4dbfbc3d96
1 changed files with 10 additions and 3 deletions
|
@ -142,7 +142,6 @@ class LockViewController: NSViewController {
|
|||
return
|
||||
}
|
||||
let serverPathString = serverPath as String
|
||||
let itemServerRelativePath = serverPathString
|
||||
let kit = NextcloudKit()
|
||||
kit.setup(
|
||||
user: account.username,
|
||||
|
@ -173,10 +172,18 @@ class LockViewController: NSViewController {
|
|||
|
||||
descriptionLabel.stringValue =
|
||||
"Communicating with server, \(locking ? "locking" : "unlocking") file…"
|
||||
|
||||
|
||||
let serverUrlFileName = itemMetadata.serverUrl + "/" + itemMetadata.fileName
|
||||
Logger.lockViewController.info(
|
||||
"""
|
||||
Locking file: \(serverUrlFileName, privacy: .public)
|
||||
\(self.locking ? "locking" : "unlocking", privacy: .public)
|
||||
"""
|
||||
)
|
||||
|
||||
let error = await withCheckedContinuation { continuation in
|
||||
kit.lockUnlockFile(
|
||||
serverUrlFileName: itemServerRelativePath,
|
||||
serverUrlFileName: serverUrlFileName,
|
||||
shouldLock: locking,
|
||||
completion: { _, error in
|
||||
continuation.resume(returning: error)
|
||||
|
|
Loading…
Reference in a new issue