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
parent 17256d3902
commit c254bb01a3
No known key found for this signature in database
GPG Key ID: 7D0F74F05C22F553

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) {