treat 404 on DELETE as success (fixes #94)

pull/2/head
rfc2822 11 years ago
parent 759e32b89b
commit 0f09881eaf

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

Loading…
Cancel
Save