From 925d889e661dff18c040250dbcc933569acfb801 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Tue, 22 Sep 2015 15:51:51 +1000 Subject: [PATCH] [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 --- src/requestgenerator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/requestgenerator.cpp b/src/requestgenerator.cpp index 1b1ca97..385f4a5 100644 --- a/src/requestgenerator.cpp +++ b/src/requestgenerator.cpp @@ -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);