mirror of
https://github.com/etesync/android
synced 2024-12-23 15:18:14 +00:00
treat 404 on DELETE as success (fixes #94)
This commit is contained in:
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…
Reference in New Issue
Block a user