[CalendarServer-changes] [245]
CalendarServer/trunk/twistedcaldav/static.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Oct 4 14:42:05 PDT 2006
Revision: 245
http://trac.macosforge.org/projects/calendarserver/changeset/245
Author: wsanchez at apple.com
Date: 2006-10-04 14:42:05 -0700 (Wed, 04 Oct 2006)
Log Message:
-----------
Nix render().
Add hasChild().
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/static.py
Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py 2006-10-04 21:41:31 UTC (rev 244)
+++ CalendarServer/trunk/twistedcaldav/static.py 2006-10-04 21:42:05 UTC (rev 245)
@@ -632,12 +632,12 @@
"""
super(CalendarHomeProvisioningFile, self).__init__(path)
- def render(self, request):
- return StatusResponse(
- responsecode.OK,
- "This collection contains user calendar home collections",
- title=self.displayName()
- )
+ def hasChild(self, name):
+ """
+ @return: C{True} if this resource has a child with the given name,
+ C{False} otherwise.
+ """
+ return name in self.listChildren()
def getChild(self, name):
if name == "": return self
@@ -649,9 +649,8 @@
assert self.exists()
assert self.isCollection()
- # FIXME: Do a real lookup of what's valid here
- if name[0] == ".": return None
- if len(name) > 8: return None
+ if not self.hasChild(name):
+ return None
child_fp.makedirs()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061004/f3cffb88/attachment.html
More information about the calendarserver-changes
mailing list