Commit 1fda5504 authored by Martijn Pieters's avatar Martijn Pieters

Shortcut the case where the path searched for is longer than anything indexed.

parent 2d5e7876
...@@ -174,6 +174,10 @@ class PathIndex(Persistent, SimpleItem): ...@@ -174,6 +174,10 @@ class PathIndex(Persistent, SimpleItem):
comps = filter(None, path.split('/')) 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: if len(comps) == 0:
return IISet(self._unindex.keys()) 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