mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-13 17:38:32 +03:00
[CSE] Fix reading encrypted status of folders.
This commit is contained in:
parent
893ca66af8
commit
4878e824e5
1 changed files with 5 additions and 4 deletions
|
@ -1541,17 +1541,18 @@ 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 = reader.readElementText(QXmlStreamReader::SkipChildElements).remove("/remote.php/webdav/");
|
||||
if (!currFile.endsWith('/'))
|
||||
continue;
|
||||
currFile.clear();
|
||||
currEncryptedStatus = -1;
|
||||
}
|
||||
if (reader.name() == QLatin1String("is-encrypted")) {
|
||||
if (not currFile.isEmpty() && reader.name() == QLatin1String("is-encrypted")) {
|
||||
currEncryptedStatus = (bool) reader.readElementText(QXmlStreamReader::SkipChildElements).toInt();
|
||||
}
|
||||
}
|
||||
|
||||
if (!currFile.isEmpty() && currEncryptedStatus != -1) {
|
||||
folderStatus.insert(currFile.remove("/remote.php/webdav/"), currEncryptedStatus);
|
||||
folderStatus.insert(currFile, currEncryptedStatus);
|
||||
currFile.clear();
|
||||
currEncryptedStatus = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue