Don't insert items into the folder model if selectiveSync is not supported
authorHannah von Reth <hannah.vonreth@owncloud.com>
Mon, 9 Mar 2020 16:45:19 +0000 (17:45 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:08 +0000 (10:59 +0100)
This fixes an assertion in FolderStatusModel::SubFolderInfo::resetSubs
rowCount reported 0 but we actually had items in the model

src/gui/folderstatusmodel.cpp

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