Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libsync/propagateuploadng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "config.h"

Check failure on line 7 in src/libsync/propagateuploadng.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/propagateuploadng.cpp:7:10 [clang-diagnostic-error]

'config.h' file not found
#include "propagateupload.h"
#include "owncloudpropagator_p.h"
#include "networkjobs.h"
Expand All @@ -25,6 +25,8 @@
#include <cmath>
#include <cstring>

using namespace Qt::StringLiterals;

namespace OCC {

constexpr auto relativeUploadsPath = "remote.php/dav/uploads/";
Expand Down Expand Up @@ -80,9 +82,9 @@
QByteArray PropagateUploadFileNG::destinationHeader() const
{
const auto davUrl = Utility::trailingSlashPath(propagator()->account()->davUrl().toString());
const auto remotePath = Utility::noLeadingSlashPath(propagator()->fullRemotePath(_fileToUpload._file));
const auto remotePath = QUrl::toPercentEncoding(Utility::noLeadingSlashPath(propagator()->fullRemotePath(_fileToUpload._file)), "/"_ba);
const auto destination = QString(davUrl + remotePath);
return QUrl::toPercentEncoding(destination, "/");
return destination.toUtf8();
}

void PropagateUploadFileNG::doStartUpload()
Expand Down
1 change: 1 addition & 0 deletions test/testchunkingng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private slots:
QVERIFY(destinationHeader.contains("SQ-0.5%25BF-150"));
QVERIFY(destinationHeader.contains("/A/SQ-0.5%25BF-150/"));
QVERIFY(!destinationHeader.contains("%2F"));
QVERIFY(destinationHeader.startsWith("http://"));
}

// Test resuming when there's a confusing chunk added
Expand Down
Loading