Better collection discovery

This commit is contained in:
Guillaume Ayoub
2016-04-09 15:11:47 +02:00
parent 058bd454c0
commit 7a0e267f19
4 changed files with 50 additions and 42 deletions

View File

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