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 <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2024-02-16 14:25:22 +01:00 committed by backportbot[bot]
parent 1e898e773f
commit 904ac2c9e3
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ void Folder::slotFilesLockReleased(const QSet<QString> &files)
}
const auto canUnlockFile = isFileRecordValid
&& rec._lockstate._locked
&& rec._lockstate._lockOwnerType == static_cast<qint64>(SyncFileItem::LockOwnerType::TokenLock)
&& (!_accountState->account()->capabilities().filesLockTypeAvailable() || rec._lockstate._lockOwnerType == static_cast<qint64>(SyncFileItem::LockOwnerType::TokenLock))
&& rec._lockstate._lockOwnerId == _accountState->account()->davUser();
if (!canUnlockFile) {