diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2014-11-27 14:50:36 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2014-11-27 14:50:36 +0300 |
commit | e7e91b6931d4d30e86a0abc0f240cafb59c851f9 (patch) | |
tree | b8787ca2d3778396be6e1346f3ee6fb81beb67bf /src/mirall | |
parent | 1f9d02e7fa6d4db57aeb01865503b046465f050a (diff) |
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.
Diffstat (limited to 'src/mirall')
-rw-r--r-- | src/mirall/folder.cpp | 6 |
1 files changed, 1 insertions, 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()); } |