Commit 925d889e authored by chriadam's avatar chriadam

[buteo-sync-plugin-carddav] Improve addressbook set path handling. Contributes to MER#1304

This commit ensures that we allow paths which begin with non-separator
characters.

Contributes to MER#1304
parent 1cacb80a
......@@ -65,7 +65,11 @@ QNetworkReply *RequestGenerator::generateRequest(const QString &url,
// this is because the initial URL may be a user-principals URL
// but subsequent paths are not relative to that one, but instead
// are relative to the root path /
reqUrl.setPath(path);
if (path.startsWith('/')) {
reqUrl.setPath(path);
} else {
reqUrl.setPath('/' + path);
}
}
if (!m_username.isEmpty() && !m_password.isEmpty()) {
reqUrl.setUserName(m_username);
......
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