Commit 0fe8faf6 authored by Guido van Rossum's avatar Guido van Rossum

Fix a bug in unindexing removed messages (it was iterating over a lazy

list that was being modified as we went).
[Backport from Zope3; I'm not actually sure if the list returned by
**Btree.keys() is lazy, but I assume it is.]
parent 0c9da1d4
......@@ -468,7 +468,7 @@ class Indexer:
self.index.index_text(docid, text)
self.maycommit()
# Remove messages from the folder that no longer exist
for path in self.path2docid.keys(f.name):
for path in list(self.path2docid.keys(f.name)):
if not path.startswith(f.name + "/"):
break
if self.getmtime(path) == 0:
......
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