Unverified Commit d5e0c457 authored by Thomas Greenwood's avatar Thomas Greenwood
Browse files

Preserve Owncloud URL path when returning dav data

parent befbe3d6
...@@ -203,12 +203,17 @@ void OwncloudController::finish(const QStringList &disabledServices) ...@@ -203,12 +203,17 @@ void OwncloudController::finish(const QStringList &disabledServices)
data.insert(QStringLiteral("__service/") + service, false); data.insert(QStringLiteral("__service/") + service, false);
} }
QUrl carddavUrl(m_server); QUrl serverUrl(m_server);
QUrl carddavUrl(serverUrl.adjusted(QUrl::StripTrailingSlash));
carddavUrl.setPath(carddavUrl.path() + QStringLiteral("/remote.php/carddav/addressbooks/%1").arg(m_username)); carddavUrl.setPath(carddavUrl.path() + QStringLiteral("/remote.php/carddav/addressbooks/%1").arg(m_username));
QUrl webdavUrl(serverUrl.adjusted(QUrl::StripTrailingSlash));
webdavUrl.setPath(webdavUrl.path() + QStringLiteral("/remote.php/webdav"));
data.insert(QStringLiteral("carddavUrl"), carddavUrl); data.insert(QStringLiteral("carddavUrl"), carddavUrl);
data.insert(QStringLiteral("dav/host"), carddavUrl.host()); data.insert(QStringLiteral("dav/host"), carddavUrl.host());
data.insert(QStringLiteral("dav/storagePath"), QStringLiteral("/remote.php/webdav")); data.insert(QStringLiteral("dav/storagePath"), webdavUrl.path());
Q_EMIT wizardFinished(m_username, m_password, data); Q_EMIT wizardFinished(m_username, m_password, data);
} }
......
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