From ffa136e78f80029077ff06fda5f696bd52691aac Mon Sep 17 00:00:00 2001 From: Meesch <31687030+Meesch@users.noreply.github.com> Date: Tue, 28 May 2024 13:46:24 +0200 Subject: [PATCH] improve snapshot skipping for ublad --- backend/corpora/ublad/ublad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/corpora/ublad/ublad.py b/backend/corpora/ublad/ublad.py index f0a6b6074..4c8c38f48 100644 --- a/backend/corpora/ublad/ublad.py +++ b/backend/corpora/ublad/ublad.py @@ -73,8 +73,8 @@ def es_settings(self): def sources(self, start=min_date, end=max_date): for directory, _, filenames in os.walk(self.data_directory): _body, tail = os.path.split(directory) - if tail.startswith("."): - # don't go through directories from snapshots + if '.snapshot' in _: + _.remove('.snapshot') continue for filename in filenames: if filename != '.DS_Store':