From c254bb01a39b06e9d91c5cc481894f0b81ed9d8e 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 4e582bfa70..afa90485e9 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) {