From 1988c9d8c4c2de24a384c89aff71d2a07a3b04a4 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Mon, 23 Sep 2013 15:07:28 +0200 Subject: [PATCH] Do complete sync if network was disconnected. This fixes owncloud/mirall#1007 --- src/mirall/folder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp index 9cac3cf56..eb700e6ce 100644 --- a/src/mirall/folder.cpp +++ b/src/mirall/folder.cpp @@ -111,6 +111,7 @@ bool Folder::init() } return _csync_ctx; } + Folder::~Folder() { if( _thread ) { @@ -234,8 +235,9 @@ void Folder::slotPollTimerTimeout() { qDebug() << "* Polling" << alias() << "for changes. (time since next sync:" << (_timeSinceLastSync.elapsed() / 1000) << "s)"; - if (quint64(_timeSinceLastSync.elapsed()) > MirallConfigFile().forceSyncInterval()) { - qDebug() << "* Force Sync now"; + if (quint64(_timeSinceLastSync.elapsed()) > MirallConfigFile().forceSyncInterval() || + _syncResult.status() != SyncResult::Success ) { + qDebug() << "** Force Sync now"; evaluateSync(QStringList()); } else { RequestEtagJob* job = new RequestEtagJob(secondPath(), this);