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 1c001ee138.
This commit is contained in:
Olivier Goffart 2014-11-27 12:50:36 +01:00
parent 1f9d02e7fa
commit e7e91b6931

View file

@ -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());
}