diff options
author | Klaas Freitag <freitag@owncloud.com> | 2013-09-23 17:07:28 +0400 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2013-09-23 17:10:42 +0400 |
commit | 1988c9d8c4c2de24a384c89aff71d2a07a3b04a4 (patch) | |
tree | d58bb3f27b9ba45db1f6fce0412863c9ad1f1669 | |
parent | 1eaa1e47fe0c8bd6dd04e80b81a9864406824140 (diff) |
Do complete sync if network was disconnected.
This fixes owncloud/mirall#1007
-rw-r--r-- | src/mirall/folder.cpp | 6 |
1 files 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); |