Просмотр исходного кода

Don't be so optimistic about collection detection.

For clients that can't create collections with MK* requests and that don't
use GET requests, is_leaf gives False for empty collections only reached
through a PROPFIND request. As Radicale can't create a collection for
each type of request, we have to strip the last part of path for paths ending
with .ics and .vcf, as they can be represent items and not collections.
Guillaume Ayoub 12 лет назад
Родитель
Сommit
a884169487
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      radicale/ical.py

+ 1 - 1
radicale/ical.py

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