From 3c50474ce4089d44ea7a44a55c38c8c61f1989bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 25 Jul 2023 17:13:28 +0200 Subject: [PATCH] fix: check if a tree.pickle.gz exists in the background indexer --- bin/background_indexer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/background_indexer.py b/bin/background_indexer.py index e769d180..10ff1d4f 100755 --- a/bin/background_indexer.py +++ b/bin/background_indexer.py @@ -34,9 +34,10 @@ class BackgroundIndexer(AbstractManager): def _build_missing_pickles(self): for uuid_path in sorted(self.lookyloo.capture_dir.glob('**/uuid'), reverse=True): - if ((uuid_path.parent / 'tree.pickle').exists() - or not list(uuid_path.parent.rglob('*.har')) - or not list(uuid_path.parent.rglob('*.har.gz'))): + if ((uuid_path.parent / 'tree.pickle.gz').exists() + or (uuid_path.parent / 'tree.pickle').exists() + or not list(uuid_path.parent.rglob('*.har.gz')) + or not list(uuid_path.parent.rglob('*.har'))): continue lock_file = uuid_path.parent / 'lock'