Decode the href from the XML payload

The XML we get as reply has href entities properly percent encoded.
Since we didn't go through QUrl next we didn't get a properly decoded
version. Make sure we decode it before storage.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-07-07 16:50:31 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent f90d6951c2
commit 217869e95c

View File

@ -86,7 +86,7 @@ bool GetFolderEncryptStatusJob::finished()
if (type == QXmlStreamReader::StartElement) {
if (reader.name() == QLatin1String("href")) {
// If the current file is not a folder, ignore it.
currFile = reader.readElementText(QXmlStreamReader::SkipChildElements);
currFile = QUrl::fromPercentEncoding(reader.readElementText(QXmlStreamReader::SkipChildElements).toUtf8());
currFile.remove(base + QLatin1String("/remote.php/webdav/"));
if (!currFile.endsWith('/'))
currFile.clear();