diff --git a/libraries/networking/src/AccountManager.cpp b/libraries/networking/src/AccountManager.cpp index 916e8aa01c..9e4cb01e45 100644 --- a/libraries/networking/src/AccountManager.cpp +++ b/libraries/networking/src/AccountManager.cpp @@ -695,7 +695,7 @@ void AccountManager::setAccessTokens(const QString& response) { } else { // clear the path from the response URL so we have the right root URL for this access token QUrl rootURL = rootObject.contains("url") ? rootObject["url"].toString() : _authURL; - rootURL.setPath(getMetaverseServerURLPath() + ""); + rootURL.setPath(getMetaverseServerURLPath()); qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString()); @@ -730,7 +730,7 @@ void AccountManager::requestAccessTokenFinished() { } else { // clear the path from the response URL so we have the right root URL for this access token QUrl rootURL = requestReply->url(); - rootURL.setPath(getMetaverseServerURLPath() + ""); + rootURL.setPath(getMetaverseServerURLPath()); qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString()); @@ -766,7 +766,7 @@ void AccountManager::refreshAccessTokenFinished() { } else { // clear the path from the response URL so we have the right root URL for this access token QUrl rootURL = requestReply->url(); - rootURL.setPath(getMetaverseServerURLPath() + ""); + rootURL.setPath(getMetaverseServerURLPath()); qCDebug(networking) << "Storing an account with a refreshed access-token for" << qPrintable(rootURL.toString()); diff --git a/libraries/networking/src/MetaverseAPI.cpp b/libraries/networking/src/MetaverseAPI.cpp index 068baed931..290267d96d 100644 --- a/libraries/networking/src/MetaverseAPI.cpp +++ b/libraries/networking/src/MetaverseAPI.cpp @@ -39,11 +39,7 @@ namespace MetaverseAPI { QString getCurrentMetaverseServerURLPath(bool appendForwardSlash){ QString path = getCurrentMetaverseServerURL().path(); - if (path.isEmpty()) { - return path; - } - - if (appendForwardSlash) { + if (!path.isEmpty() && appendForwardSlash) { path.append("/"); }