Chunking Move: Fix too many starting slashes in the destination header
authorOlivier Goffart <ogoffart@woboq.com>
Thu, 29 Nov 2018 22:17:34 +0000 (23:17 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:31 +0000 (10:58 +0100)
Commit 6ca724f fixed it for the move case. But the upload MOVE did the same

Issue #6904

src/libsync/propagateuploadng.cpp

index 336b02a1f3553d232080d433c19ea6194754fc2f..f8375a1e91fd7fa25a13a2bd78f93c7629a7c983 100644 (file)
@@ -290,8 +290,8 @@ void PropagateUploadFileNG::startNextChunk()
 
         // Finish with a MOVE
         // If we changed the file name, we must store the changed filename in the remote folder, not the original one.
-        QString destination = QDir::cleanPath(propagator()->account()->url().path() + QLatin1Char('/')
-            + propagator()->account()->davPath() + propagator()->_remoteFolder + _fileToUpload._file);
+        QString destination = QDir::cleanPath(propagator()->account()->davUrl().path()
+            + propagator()->_remoteFolder + _fileToUpload._file);
         auto headers = PropagateUploadFileCommon::headers();
 
         // "If-Match applies to the source, but we are interested in comparing the etag of the destination