fix: incorrect pickle rebuild, causing the index to get stuck

pull/733/head
Raphaël Vinot 2023-07-03 17:04:55 +02:00
parent 8bf438e9f3
commit 6bb660ed82
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,8 @@ class CapturesIndex(Mapping):
cc = CaptureCache(cached)
# NOTE: checking for pickle to exist may be a bad idea here.
if (cc.capture_dir.exists()
and (cc.capture_dir / 'tree.pickle').exists()
and ((cc.capture_dir / 'tree.pickle.gz').exists()
or (cc.capture_dir / 'tree.pickle').exists())
and not cc.incomplete_redirects):
self.__cache[uuid] = cc
return self.__cache[uuid]