]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Fix assert on restore after propagation (#4823)
authorJocelyn Turcotte <jturcotte@woboq.com>
Wed, 11 May 2016 16:16:46 +0000 (18:16 +0200)
committerKlaas Freitag <freitag@owncloud.com>
Wed, 11 May 2016 16:16:46 +0000 (18:16 +0200)
The assert was there to make sure that this case wasn't happening
to eventually be properly tested. Remove the assert for now but this
codepath should eventually be unit tested using this specific situation.

src/libsync/syncfilestatustracker.cpp

index c749ae3a34e2b8013b1eba6c306d32af3f1b6f5e..c083bd4c6f0ea28af77ac57dda22cd4552d4b4d0 100644 (file)
@@ -180,8 +180,7 @@ void SyncFileStatusTracker::slotItemCompleted(const SyncFileItem &item)
     } else if (showWarningInSocketApi(item)) {
         _syncProblems[item._file] = SyncFileStatus::StatusWarning;
     } else {
-        // There is currently no situation where an error status set during discovery/update is fixed by propagation.
-        Q_ASSERT(_syncProblems.find(item._file) == _syncProblems.end());
+        _syncProblems.erase(item._file);
     }
 
     emit fileStatusChanged(getSystemDestination(item.destination()), syncFileItemStatus(item));