Commit 9abec195 authored by Martijn Pieters's avatar Martijn Pieters

Merge r94050 from trunk: shortcut for path-longer-than-anything-indexed case

parent c5267060
......@@ -176,6 +176,10 @@ class PathIndex(Persistent, SimpleItem):
for level in xrange(self._depth + 1)])
comps = filter(None, path.split('/'))
if level + len(comps) - 1 > self._depth:
# Our search is for a path longer than anything in the index
return IISet()
if len(comps) == 0:
return IISet(self._unindex.keys())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment