From 2d1e6e394d14b21525d981546108bb8f0ba44f98 Mon Sep 17 00:00:00 2001 From: Randy Ramos Date: Wed, 6 Sep 2017 17:33:34 -0400 Subject: 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 Signed-off-by: Lukas Fleischer --- contrib/caldav/calcurse-caldav.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'contrib') 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): -- cgit v1.2.3-70-g09d2