[Zope-Checkins] CVS: Zope2 - Traversable.py:1.8

evan@serenade.digicool.com evan@serenade.digicool.com
Mon, 21 May 2001 15:47:58 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/home/evan/Zope/trunk/lib/python/OFS

Modified Files:
	Traversable.py 
Log Message:
Fix [un]restrictedTraverse of '/'.



--- Updated File Traversable.py in package Zope2 --
--- Traversable.py	2001/01/17 15:18:44	1.7
+++ Traversable.py	2001/05/21 19:47:28	1.8
@@ -151,6 +151,11 @@
         REQUEST={'TraversalRequestNameStack': path}
         path.reverse()
         pop=path.pop
+
+        if len(path) > 1 and not path[0]:
+            # Remove trailing slash
+            path.pop(0)
+
         if restricted: securityManager=getSecurityManager()
         else: securityManager=None