From: Jocelyn Turcotte Date: Fri, 5 Aug 2016 15:18:16 +0000 (+0200) Subject: Make sure that we invalidate parents on blacklisted items X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1113^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=82ef1bcfe0093d2191f0943fe90001c2bbfc1b9b;p=nextcloud-desktop.git Make sure that we invalidate parents on blacklisted items Add a missing call that we currently only do in slotItemCompleted. This would normally only affect the first sync and would have gotten properly update at the end of the sync anyway. --- diff --git a/src/libsync/syncfilestatustracker.cpp b/src/libsync/syncfilestatustracker.cpp index 152cd0dce..547cfdc37 100644 --- a/src/libsync/syncfilestatustracker.cpp +++ b/src/libsync/syncfilestatustracker.cpp @@ -150,6 +150,7 @@ void SyncFileStatusTracker::slotAboutToPropagate(SyncFileItemVector& items) if (showErrorInSocketApi(*item)) { _syncProblems[item->_file] = SyncFileStatus::StatusError; + invalidateParentPaths(item->destination()); } else if (showWarningInSocketApi(*item)) { _syncProblems[item->_file] = SyncFileStatus::StatusWarning; } diff --git a/test/testsyncfilestatustracker.cpp b/test/testsyncfilestatustracker.cpp index 35fdbbf20..f7fcb528d 100644 --- a/test/testsyncfilestatustracker.cpp +++ b/test/testsyncfilestatustracker.cpp @@ -310,10 +310,8 @@ private slots: // The root should show SYNC even though there is an error underneath, // since C/c1 is syncing and the SYNC status has priority. QCOMPARE(statusSpy.statusOf(""), SyncFileStatus(SyncFileStatus::StatusSync)); - QEXPECT_FAIL("", "Only one blacklist item underneath, we shouldn't be showing SYNC.", Continue); QCOMPARE(statusSpy.statusOf("A"), SyncFileStatus(SyncFileStatus::StatusWarning)); QCOMPARE(statusSpy.statusOf("A/a1"), SyncFileStatus(SyncFileStatus::StatusError)); - QEXPECT_FAIL("", "Only one blacklist item underneath, we shouldn't be showing SYNC.", Continue); QCOMPARE(statusSpy.statusOf("B"), SyncFileStatus(SyncFileStatus::StatusWarning)); QCOMPARE(statusSpy.statusOf("B/b0"), SyncFileStatus(SyncFileStatus::StatusError)); QCOMPARE(statusSpy.statusOf("C"), SyncFileStatus(SyncFileStatus::StatusSync));