Explorar o código

Fix the test used to guess if a path is a collection

Guillaume Ayoub %!s(int64=12) %!d(string=hai) anos
pai
achega
205600c2d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      radicale/ical.py

+ 1 - 1
radicale/ical.py

@@ -214,7 +214,7 @@ class Collection(object):
             return []
 
         # Try to guess if the path leads to a collection or an item
-        if not (cls.is_leaf("/".join(attributes)) or
+        if (cls.is_leaf("/".join(attributes[:-1])) or not
                 path.endswith(("/", ".ics", ".vcf", "/caldav", "/carddav"))):
             attributes.pop()