_folder2encryptedStatus.insert((*it).first, (*it).second);
}
- _refreshingEncryptionStatus = false;
- emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
+ for (const auto &folder : result.keys()) {
+ if (folder == job->folder()) {
+ continue;
+ }
+ scheduleFolderEncryptedStatusJob(folder);
+ }
+
+ if (_folderStatusJobs.isEmpty()) {
+ _refreshingEncryptionStatus = false;
+ emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
+ }
}
void ClientSideEncryption::folderEncryptedStatusError(int error)
_folderStatusJobs.removeAll(job);
- _refreshingEncryptionStatus = false;
- emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
+ if (_folderStatusJobs.isEmpty()) {
+ _refreshingEncryptionStatus = false;
+ emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
+ }
}
FolderMetadata::FolderMetadata(AccountPtr account, const QByteArray& metadata, int statusCode) : _account(account)
req.setPriority(QNetworkRequest::HighPriority);
req.setRawHeader("OCS-APIREQUEST", "true");
req.setHeader(QNetworkRequest::ContentTypeHeader, QByteArrayLiteral("application/xml"));
- req.setRawHeader("Depth", "infinity");
+ req.setRawHeader("Depth", "1");
QByteArray xml = R"(<d:propfind xmlns:d="DAV:"> <d:prop xmlns:nc="http://nextcloud.org/ns"> <nc:is-encrypted/> </d:prop> </d:propfind>)";
auto *buf = new QBuffer(this);