[CSE] Don't query for files on GetFolderEncryptStatusJob

The request for folders whas also replying for files.
This commit is contained in:
Tomaz Canabrava 2017-12-07 18:10:14 +01:00
parent 7fe4dd2163
commit 19120fde9f

View file

@ -1540,7 +1540,10 @@ bool GetFolderEncryptStatusJob::finished()
auto type = reader.readNext();
if (type == QXmlStreamReader::StartElement) {
if (reader.name() == QLatin1String("href")) {
currFile = reader.readElementText(QXmlStreamReader::SkipChildElements);
// If the current file is not a folder, ignore it.
currFile = reader.readElementText(QXmlStreamReader::SkipChildElements);
if (!currFile.endsWith('/'))
continue;
}
if (reader.name() == QLatin1String("is-encrypted")) {
currEncryptedStatus = (bool) reader.readElementText(QXmlStreamReader::SkipChildElements).toInt();