Skip to content

Commit

Permalink
provide LOCK token when uploading a single file via PUT
Browse files Browse the repository at this point in the history
for simple webDAV upload via PUT verb, provide the needed lock token

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Sep 25, 2024
1 parent afaaf30 commit b1352ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsync/propagateuploadv1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "> (<opaquelocktoken:" + _item->_lockToken.toUtf8() + ">)").toUtf8();
}

qint64 chunkStart = 0;

Check warning on line 109 in src/libsync/propagateuploadv1.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/propagateuploadv1.cpp:109:12 [cppcoreguidelines-init-variables]

variable 'chunkStart' is not initialized
qint64 currentChunkSize = fileSize;
bool isFinalChunk = false;
Expand Down

0 comments on commit b1352ec

Please sign in to comment.