[Zope-dev] unrestrictedTraverse unable to access the root object
Steve Alexander
steve@cat-box.net
Fri, 09 Nov 2001 10:27:39 +0000
Johan Carlsson [Torped] wrote:
> Hi all,
> The collector seems to still be offline?
http://new.zope.org/Collector
> I just realized that the unrestrictedTraverse returns self
> for the empty-string url: ''
> I did expect it to return the root object because the empty-string
> is equal to the path tuple ('',).
You convert from a path tuple to a path like this:
path='/'.join(path_tuple)
While you're correct that the path tuple ('',) is equivalent to the path
'', I thing the path '' means "current object".
So, the root would be represented by the path '/', and therefore the
tuple ('','').
I guess I should go and read the traversal code again...
--
Steve Alexander
Software Engineer
Cat-Box limited