From ee4cbf52dce693120943d74eb51ab00a98c594e1 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 5 Nov 2013 17:53:01 +0100 Subject: [PATCH] Remove straycats collected in the reconcile phase from journal. --- src/mirall/csyncthread.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mirall/csyncthread.cpp b/src/mirall/csyncthread.cpp index 4ec295b518..9ab00c7d80 100644 --- a/src/mirall/csyncthread.cpp +++ b/src/mirall/csyncthread.cpp @@ -22,6 +22,7 @@ #include "syncjournaldb.h" #include "syncjournalfilerecord.h" #include "creds/abstractcredentials.h" +#include "csync_rename.h" #ifdef Q_OS_WIN #include @@ -429,6 +430,8 @@ void CSyncThread::startSync() ne_session_s *session = 0; // that call to set property actually is a get which will return the session + // FIXME add a csync_get_module_property to csync + csync_set_module_property(_csync_ctx, "get_dav_session", &session); Q_ASSERT(session); @@ -455,6 +458,13 @@ void CSyncThread::startSync() } _propagator->_uploadLimit = uploadLimit; + // remove the straycats (superflous database entries) + int cnt = csync_straycat_count(_csync_ctx); + for( int i = 0; i < cnt; i++ ) { + _propagator->_journal->deleteFileRecord( QString::fromUtf8( csync_straycat_at(_csync_ctx, i) ) ); + } + + slotProgress(Progress::StartSync, QString(), 0, 0); _propagator->start(_syncedItems); }