1
0
mirror of https://github.com/etesync/android synced 2024-11-16 04:49:06 +00:00

SyncManager: add remote entries to cache only after they've been processed

Before this change we were adding them to cache before they were
processed, potentially persisting malformed entries, or entries we
haven't yet processed causing issues if sync was aborted before an entry
was fully processed.
This commit is contained in:
Tom Hacohen 2017-03-27 16:08:45 +01:00
parent 987076d95e
commit 784070c27c

View File

@ -298,10 +298,11 @@ abstract public class SyncManager {
App.log.info("Processing (" + String.valueOf(i) + "/" + strTotal + ") " + entry.toString());
SyncEntry cEntry = SyncEntry.fromJournalEntry(settings.password(), entry);
persistSyncEntry(entry.getUuid(), cEntry);
App.log.info("Processing resource for journal entry");
processSyncEntry(cEntry);
persistSyncEntry(entry.getUuid(), cEntry);
remoteCTag = entry.getUuid();
}
} finally {