summaryrefslogtreecommitdiffstats
path: root/contrib/caldav
diff options
context:
space:
mode:
authorRandy Ramos <rramos1295@gmail.com>2017-09-06 17:33:34 -0400
committerLukas Fleischer <lfleischer@calcurse.org>2017-09-08 22:35:36 +0200
commit2d1e6e394d14b21525d981546108bb8f0ba44f98 (patch)
tree3907e57456c8e73eaee55f120baae88da8fd94c8 /contrib/caldav
parente943b0605ff7000280bcf190f35f9097a6ae5f67 (diff)
downloadcalcurse-2d1e6e394d14b21525d981546108bb8f0ba44f98.tar.gz
calcurse-2d1e6e394d14b21525d981546108bb8f0ba44f98.zip
Change remote_wipe to delete objects individually
Certain CalDAV servers prohibit a single DELETE request to be sent to the calendar collection root. Instead items need to be deleted one by one. Signed-off-by: Randy Ramos <rramos1295@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib/caldav')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 84e2638..f98ee9d 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -183,7 +183,9 @@ def remote_wipe(conn):
if dry_run:
return
- remote_query(conn, "DELETE", path, {}, None)
+ remote_items = get_etags(conn)
+ for href in remote_items:
+ remove_remote_object(conn, remote_items[href], href)
def get_syncdb(fn):