mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 12:55:44 +03:00
in wizard always use the correct way to get dav path
fixes listing being incorrect when using dav endpoint Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
6ac719d74c
commit
77433f7e1d
3 changed files with 6 additions and 16 deletions
|
@ -85,18 +85,7 @@ Account::~Account() = default;
|
|||
|
||||
QString Account::davPath() const
|
||||
{
|
||||
if (capabilities().chunkingNg()) {
|
||||
// The chunking-ng means the server prefer to use the new webdav URL
|
||||
return QLatin1String("/remote.php/dav/files/") + davUser() + QLatin1Char('/');
|
||||
}
|
||||
|
||||
// make sure to have a trailing slash
|
||||
if (!_davPath.endsWith('/')) {
|
||||
QString dp(_davPath);
|
||||
dp.append('/');
|
||||
return dp;
|
||||
}
|
||||
return _davPath;
|
||||
return QLatin1String("/remote.php/dav/files/") + davUser() + QLatin1Char('/');
|
||||
}
|
||||
|
||||
void Account::setSharedThis(AccountPtr sharedThis)
|
||||
|
|
|
@ -214,10 +214,11 @@ private slots:
|
|||
if (verb == "PROPFIND") {
|
||||
auto data = stream->readAll();
|
||||
if (data.contains("data-fingerprint")) {
|
||||
if (request.url().path().endsWith("dav/"))
|
||||
if (request.url().path().endsWith("dav/files/admin/")) {
|
||||
++fingerprintRequests;
|
||||
else
|
||||
} else {
|
||||
fingerprintRequests = -10000; // fingerprint queried on incorrect path
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
@ -91,7 +91,7 @@ private slots:
|
|||
auto oldLocalState = fakeFolder.currentLocalState();
|
||||
auto oldRemoteState = fakeFolder.currentRemoteState();
|
||||
|
||||
QString errorFolder = "dav/B";
|
||||
QString errorFolder = "dav/files/admin/B";
|
||||
QString fatalErrorPrefix = "Server replied with an error while reading directory 'B' : ";
|
||||
fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *)
|
||||
-> QNetworkReply *{
|
||||
|
@ -133,7 +133,7 @@ private slots:
|
|||
//
|
||||
// Check the same discovery error on the sync root
|
||||
//
|
||||
errorFolder = "dav/";
|
||||
errorFolder = "dav/files/admin/";
|
||||
fatalErrorPrefix = "Server replied with an error while reading directory '' : ";
|
||||
errorSpy.clear();
|
||||
QVERIFY(!fakeFolder.syncOnce());
|
||||
|
|
Loading…
Reference in a new issue