mirror of
https://github.com/etesync/android
synced 2025-01-11 08:10:58 +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.LocalCollection;
|
||||||
import at.bitfire.davdroid.resource.RemoteCollection;
|
import at.bitfire.davdroid.resource.RemoteCollection;
|
||||||
import at.bitfire.davdroid.resource.Resource;
|
import at.bitfire.davdroid.resource.Resource;
|
||||||
|
import at.bitfire.davdroid.webdav.NotFoundException;
|
||||||
import at.bitfire.davdroid.webdav.PreconditionFailedException;
|
import at.bitfire.davdroid.webdav.PreconditionFailedException;
|
||||||
|
|
||||||
public class SyncManager {
|
public class SyncManager {
|
||||||
@ -51,6 +52,8 @@ public class SyncManager {
|
|||||||
try {
|
try {
|
||||||
if (res.getName() != null) // is this resource even present remotely?
|
if (res.getName() != null) // is this resource even present remotely?
|
||||||
dav.delete(res);
|
dav.delete(res);
|
||||||
|
} catch(NotFoundException e) {
|
||||||
|
Log.i(TAG, "Locally-deleted resource has already been removed from server");
|
||||||
} catch(PreconditionFailedException e) {
|
} catch(PreconditionFailedException e) {
|
||||||
Log.i(TAG, "Locally-deleted resource has been changed on the server in the meanwhile");
|
Log.i(TAG, "Locally-deleted resource has been changed on the server in the meanwhile");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user