[CalendarServer-changes] [6662] CalendarServer/trunk/twistedcaldav/resource.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Nov 30 12:19:33 PST 2010
Revision: 6662
http://trac.macosforge.org/projects/calendarserver/changeset/6662
Author: cdaboo at apple.com
Date: 2010-11-30 12:19:29 -0800 (Tue, 30 Nov 2010)
Log Message:
-----------
Protect against a possibly missing resource - normally won't happen in a transaction based setup.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/resource.py
Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py 2010-11-29 21:33:06 UTC (rev 6661)
+++ CalendarServer/trunk/twistedcaldav/resource.py 2010-11-30 20:19:29 UTC (rev 6662)
@@ -1016,20 +1016,21 @@
for childname in (yield self.listChildren()):
childpath = joinURL(basepath, childname)
child = (yield request.locateResource(childpath))
- if privileges:
- try:
- yield child.checkPrivileges(request, privileges)
- except AccessDeniedError:
- continue
- if child.isSpecialCollection(type):
- callback(child, childpath)
-
- # No more regular collections. If we leave this in then dropbox is scanned at depth:infinity
- # and that is very painful as it requires scanning all calendar resources too. Eventually we need
- # to fix drop box and probably re-enable this for the generic case.
-# elif child.isCollection():
-# if depth == "infinity":
-# yield child.findSpecialCollectionsFaster(type, depth, request, callback, privileges)
+ if child:
+ if privileges:
+ try:
+ yield child.checkPrivileges(request, privileges)
+ except AccessDeniedError:
+ continue
+ if child.isSpecialCollection(type):
+ callback(child, childpath)
+
+ # No more regular collections. If we leave this in then dropbox is scanned at depth:infinity
+ # and that is very painful as it requires scanning all calendar resources too. Eventually we need
+ # to fix drop box and probably re-enable this for the generic case.
+ # elif child.isCollection():
+ # if depth == "infinity":
+ # yield child.findSpecialCollectionsFaster(type, depth, request, callback, privileges)
findSpecialCollections = findSpecialCollectionsFaster
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101130/3ce42e78/attachment.html>
More information about the calendarserver-changes
mailing list