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>
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();