mirror of
https://github.com/etesync/android
synced 2025-01-23 22:21:23 +00:00
Always log deletes, even when not previously added to server.
Before this change we would only add "deletes" to the server when the resource has been previously uploaded. This means that if a resource has been created and then deleted before a sync, it would not be saved, which is essentially data-loss. This commit fixes it, so we always upload a delete entry.
This commit is contained in:
parent
99fe3457fc
commit
84244330b7
@ -404,13 +404,8 @@ abstract public class SyncManager {
|
|||||||
if (Thread.interrupted())
|
if (Thread.interrupted())
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!local.isLocalOnly()) {
|
|
||||||
App.log.info(local.getUuid() + " has been deleted locally -> deleting from server");
|
App.log.info(local.getUuid() + " has been deleted locally -> deleting from server");
|
||||||
ret.add(local);
|
ret.add(local);
|
||||||
} else {
|
|
||||||
App.log.info("Removing local record #" + local.getId() + " which has been deleted locally and was never uploaded");
|
|
||||||
local.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
syncResult.stats.numDeletes++;
|
syncResult.stats.numDeletes++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user