[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cvs
Subject:    [Zope-Checkins] SVN:
From:       Martijn Pieters <mj () zopatista ! com>
Date:       2008-12-14 13:27:14
Message-ID: 20081214132714.DC7D5940AB () cvs ! zope ! org
[Download RAW message or body]

Log message for revision 94051:
  Merge r94050 from trunk: shortcut for path-longer-than-anything-indexed case

Changed:
  U   Zope/branches/2.11/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py

-=-
Modified: Zope/branches/2.11/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
===================================================================
--- Zope/branches/2.11/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	2008-12-14 \
                13:25:30 UTC (rev 94050)
+++ Zope/branches/2.11/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	2008-12-14 \
13:27:14 UTC (rev 94051) @@ -176,6 +176,10 @@
                  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())

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic