[CalendarServer-changes] [4864] CalendarServer/trunk/twistedcaldav/directory/resource.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Dec 15 18:33:28 PST 2009
Revision: 4864
http://trac.macosforge.org/projects/calendarserver/changeset/4864
Author: cdaboo at apple.com
Date: 2009-12-15 18:33:27 -0800 (Tue, 15 Dec 2009)
Log Message:
-----------
If putChild has been done use that singleton object rather than re-creating the resource
each time we traverse the path.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/resource.py
Modified: CalendarServer/trunk/twistedcaldav/directory/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/resource.py 2009-12-16 02:11:22 UTC (rev 4863)
+++ CalendarServer/trunk/twistedcaldav/directory/resource.py 2009-12-16 02:33:27 UTC (rev 4864)
@@ -60,7 +60,10 @@
name = segments[0]
if name != "":
- child = self.provisionChild(name)
+ # If getChild() finds a child resource, return it
+ child = self.getChild(name)
+ if child is None:
+ child = self.provisionChild(name)
if child:
returnValue((child, segments[1:],))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091215/e5d01cbd/attachment.html>
More information about the calendarserver-changes
mailing list