Commit 1512b544 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[owncloud] Fix double slash in URL

When the path is "/" RemoveTrailingSlash doesn't remove the slash.
If we then unconditionally append another slash we end up with a double slash that owncloud does not like.
parent a628db7a
......@@ -159,8 +159,12 @@ void QmlHelper::serverCheckResult(bool result)
url.setUserName(m_username);
url.setPassword(m_password);
url = url.adjusted(QUrl::StripTrailingSlash);
url.setPath(url.path() + '/' + "remote.php/webdav");
if (!url.path().endsWith(QLatin1String("/"))) {
url.setPath(url.path() + '/');
}
url.setPath(url.path() + "remote.php/webdav");
// Send a basic PROPFIND command to test access
const QString requestStr = QStringLiteral(
"<d:propfind xmlns:d=\"DAV:\">"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment