From 904ac2c9e3102808b9e6b601dcba34df4bc57238 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 16 Feb 2024 14:25:22 +0100 Subject: [PATCH] do not check lock type if server API is missing it will allow automated unlock if the server API is missing the ability to handle the lock types sent by the client Signed-off-by: Matthieu Gallien --- src/gui/folder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 4e582bfa707c0..afa90485e99a4 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -649,7 +649,7 @@ void Folder::slotFilesLockReleased(const QSet &files) } const auto canUnlockFile = isFileRecordValid && rec._lockstate._locked - && rec._lockstate._lockOwnerType == static_cast(SyncFileItem::LockOwnerType::TokenLock) + && (!_accountState->account()->capabilities().filesLockTypeAvailable() || rec._lockstate._lockOwnerType == static_cast(SyncFileItem::LockOwnerType::TokenLock)) && rec._lockstate._lockOwnerId == _accountState->account()->davUser(); if (!canUnlockFile) {