Преглед изворни кода

Match stupid naming conventions used by Apple's clients for collections

Guillaume Ayoub пре 12 година
родитељ
комит
61eedc2b7c
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      radicale/ical.py

+ 4 - 1
radicale/ical.py

@@ -212,7 +212,10 @@ class Collection(object):
         attributes = sane_path.split("/")
         attributes = sane_path.split("/")
         if not attributes:
         if not attributes:
             return []
             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()
             attributes.pop()
 
 
         result = []
         result = []