Skip to content

Commit

Permalink
[buteo-sync-plugin-carddav] Improve addressbook set path handling. Co…
Browse files Browse the repository at this point in the history
…ntributes to MER#1304

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

Contributes to MER#1304
  • Loading branch information
Chris Adams committed Oct 14, 2015
1 parent 1cacb80 commit 925d889
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/requestgenerator.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 925d889

Please sign in to comment.