From 90ee274744c6b59736c564d944d6cd44dc1c65d4 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 15 May 2014 11:17:13 +0200 Subject: [PATCH] We need to call csync_commit in every error cases Else there will still be outdated tree in the memory and the further sync will be confused Relates to #1710 --- src/mirall/syncengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp index 14e42aaed..9ff67e17a 100644 --- a/src/mirall/syncengine.cpp +++ b/src/mirall/syncengine.cpp @@ -553,6 +553,7 @@ void SyncEngine::slotUpdateFinished(int updateResult) if (!_journal->isConnected()) { qDebug() << "Bailing out, DB failure"; emit csyncError(tr("Cannot open the sync journal")); + csync_commit(_csync_ctx); emit finished(); _syncMutex.unlock(); _thread.quit(); @@ -569,6 +570,7 @@ void SyncEngine::slotUpdateFinished(int updateResult) emit aboutToRemoveAllFiles(_syncedItems.first()._direction, &cancel); if (cancel) { qDebug() << Q_FUNC_INFO << "Abort sync"; + csync_commit(_csync_ctx); emit finished(); _syncMutex.unlock(); _thread.quit();