diff --git a/src/libsync/propagateuploadng.cpp b/src/libsync/propagateuploadng.cpp index a67225d2a..32e1192f3 100644 --- a/src/libsync/propagateuploadng.cpp +++ b/src/libsync/propagateuploadng.cpp @@ -328,7 +328,8 @@ void PropagateUploadFileNG::finishUpload() const auto fileSize = _fileToUpload._size; headers[QByteArrayLiteral("OC-Total-Length")] = QByteArray::number(fileSize); - if (_item->_locked == SyncFileItem::LockStatus::LockedItem) { + if (_item->_lockOwnerType == SyncFileItem::LockOwnerType::TokenLock && + _item->_locked == SyncFileItem::LockStatus::LockedItem) { headers[QByteArrayLiteral("If")] = (QLatin1String("<") + propagator()->account()->davUrl().toString() + _fileToUpload._file + "> (_lockToken.toUtf8() + ">)").toUtf8(); } diff --git a/src/libsync/propagateuploadv1.cpp b/src/libsync/propagateuploadv1.cpp index 7467b2ce3..6bab06305 100644 --- a/src/libsync/propagateuploadv1.cpp +++ b/src/libsync/propagateuploadv1.cpp @@ -102,7 +102,8 @@ void PropagateUploadFileV1::startNextChunk() QString path = _fileToUpload._file; - if (_item->_locked == SyncFileItem::LockStatus::LockedItem) { + if (_item->_lockOwnerType == SyncFileItem::LockOwnerType::TokenLock && + _item->_locked == SyncFileItem::LockStatus::LockedItem) { headers[QByteArrayLiteral("If")] = (QLatin1String("<") + propagator()->account()->davUrl().toString() + _fileToUpload._file + "> (_lockToken.toUtf8() + ">)").toUtf8(); }