Don't insert items into the folder model if selectiveSync is not supported

This fixes an assertion in FolderStatusModel::SubFolderInfo::resetSubs
rowCount reported 0 but we actually had items in the model
This commit is contained in:
Hannah von Reth 2020-03-09 17:45:19 +01:00 committed by Kevin Ottens
parent 9176afe263
commit d63d4cdf62
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -630,6 +630,9 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
if (!parentInfo) { if (!parentInfo) {
return; return;
} }
if (!parentInfo->_folder->supportsSelectiveSync()) {
return;
}
ASSERT(parentInfo->_fetchingJob == job); ASSERT(parentInfo->_fetchingJob == job);
ASSERT(parentInfo->_subs.isEmpty()); ASSERT(parentInfo->_subs.isEmpty());