Fail with error before calling folder metada setup when received empty signature.

Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
Camila Ayres 2024-10-14 16:36:38 +02:00
Родитель ef811ff220
Коммит ddaaf2c344
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -696,6 +696,14 @@ void DiscoverySingleDirectoryJob::metadataReceived(const QJsonDocument &json, in
}
}
if (job->signature().isEmpty()) {
qCDebug(lcDiscovery) << "Initial signature is empty.";
_account->reportClientStatus(OCC::ClientStatusReportingStatus::E2EeError_GeneralError);
emit finished(HttpError{0, tr("Encrypted metadata setup error: initial signature from server is empty.")});
deleteLater();
return;
}
const auto e2EeFolderMetadata = new FolderMetadata(_account,
_remoteRootFolderPath,
statusCode == 404 ? QByteArray{} : json.toJson(QJsonDocument::Compact),