From e7e91b6931d4d30e86a0abc0f240cafb59c851f9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 27 Nov 2014 12:50:36 +0100 Subject: [PATCH] Revert "Folder: Don't blindly trigger sync on first EtagJob result" We need to do a sync even if the etag was empty because we do not know if this is because the etag really changed or because it was new. Also, some part of the code rely on this fact to schedule a sync. The fact that there is two sync with 30 sec at the beginning is not a big problem, because we also need to do the sync the put the directory etag in the db. This reverts commit 1c001ee13865ceb4598c989e5308d27aead74540. --- src/mirall/folder.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp index e9678ba9f..8b22144ea 100644 --- a/src/mirall/folder.cpp +++ b/src/mirall/folder.cpp @@ -321,11 +321,7 @@ void Folder::etagRetreived(const QString& etag) // re-enable sync if it was disabled because network was down FolderMan::instance()->setSyncEnabled(true); - if (_lastEtag.isEmpty()) { - _lastEtag = etag; - // don't schedule a sync in this case, the _lastEtag is empty because it is the start - // and a sync was scheduled through other means anyway. - } else if (_lastEtag != etag) { + if (_lastEtag != etag) { _lastEtag = etag; emit scheduleToSync(alias()); }