зеркало из https://github.com/nextcloud/desktop.git
lock token should be sent via webdav only for token lock type
to be able to modify a locked file using token lock, we must sent it with webdav requests this must not be sent if the file is locked but the lock type is not a token lock Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Родитель
202be8a081
Коммит
c77562022d
|
@ -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 + "> (<opaquelocktoken:" + _item->_lockToken.toUtf8() + ">)").toUtf8();
|
||||
}
|
||||
|
||||
|
|
|
@ -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 + "> (<opaquelocktoken:" + _item->_lockToken.toUtf8() + ">)").toUtf8();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче