1
0
mirror of https://github.com/etesync/android synced 2024-12-23 07:08:16 +00:00

treat 404 on DELETE as success (fixes #94)

This commit is contained in:
rfc2822 2013-11-24 13:19:55 +01:00
parent 759e32b89b
commit 0f09881eaf

View File

@ -24,6 +24,7 @@ import android.util.Log;
import at.bitfire.davdroid.resource.LocalCollection;
import at.bitfire.davdroid.resource.RemoteCollection;
import at.bitfire.davdroid.resource.Resource;
import at.bitfire.davdroid.webdav.NotFoundException;
import at.bitfire.davdroid.webdav.PreconditionFailedException;
public class SyncManager {
@ -51,6 +52,8 @@ public class SyncManager {
try {
if (res.getName() != null) // is this resource even present remotely?
dav.delete(res);
} catch(NotFoundException e) {
Log.i(TAG, "Locally-deleted resource has already been removed from server");
} catch(PreconditionFailedException e) {
Log.i(TAG, "Locally-deleted resource has been changed on the server in the meanwhile");
}