From 3a03615ccbe0fd536f6ab6dd2a1ea01543bca00c Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 23 Sep 2024 18:48:47 +0200 Subject: [PATCH] provide LOCK token when uploading a single file via PUT for simple webDAV upload via PUT verb, provide the needed lock token Signed-off-by: Matthieu Gallien --- src/libsync/propagateuploadv1.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsync/propagateuploadv1.cpp b/src/libsync/propagateuploadv1.cpp index a32e796a597de..7467b2ce31560 100644 --- a/src/libsync/propagateuploadv1.cpp +++ b/src/libsync/propagateuploadv1.cpp @@ -102,6 +102,10 @@ void PropagateUploadFileV1::startNextChunk() QString path = _fileToUpload._file; + if (_item->_locked == SyncFileItem::LockStatus::LockedItem) { + headers[QByteArrayLiteral("If")] = (QLatin1String("<") + propagator()->account()->davUrl().toString() + _fileToUpload._file + "> (_lockToken.toUtf8() + ">)").toUtf8(); + } + qint64 chunkStart = 0; qint64 currentChunkSize = fileSize; bool isFinalChunk = false;