From 61eedc2b7c5e79b77ccd77b7eacb2896c4a2249e Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 23 Aug 2013 13:33:35 +0200 Subject: [PATCH] Match stupid naming conventions used by Apple's clients for collections --- radicale/ical.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radicale/ical.py b/radicale/ical.py index 213b038..b6d123a 100644 --- a/radicale/ical.py +++ b/radicale/ical.py @@ -212,7 +212,10 @@ class Collection(object): attributes = sane_path.split("/") if not attributes: return [] - if not (cls.is_leaf("/".join(attributes)) or path.endswith("/")): + + # Try to guess if the path leads to a collection or an item + if not (cls.is_leaf("/".join(attributes)) or + path.endswith(("/", ".ics", ".vcf", "/caldav", "/carddav"))): attributes.pop() result = []