Discovery: Add a sanity check when results are parsed

This commit is contained in:
Markus Goetz 2015-04-13 15:10:04 +02:00
parent fa80a006b8
commit 0634a4d0c6

View file

@ -285,6 +285,13 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file,QMap
void DiscoverySingleDirectoryJob::lsJobFinishedWithoutErrorSlot()
{
if (!_ignoredFirst) {
// This is a sanity check, if we haven't _ignoredFirst then it means we never received any directoryListingIteratedSlot
// which means somehow the server XML was bogus
emit finishedWithError(ERRNO_WRONG_CONTENT, QLatin1String("Server error: PROPFIND reply is not XML formatted!"));
deleteLater();
return;
}
emit etagConcatenation(_etagConcatenation);
emit finishedWithResult(_results);
deleteLater();