From 0f5664028f5b7177131b5829dce50404255db33b Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Sat, 22 Feb 2020 23:07:40 +0200 Subject: [PATCH] Stricter prefix matching in launcher.py For instance, do not skip gleefandomcom if gleefandomcom_ru is found. --- launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher.py b/launcher.py index 8dbe3bd..2f2068c 100644 --- a/launcher.py +++ b/launcher.py @@ -46,7 +46,7 @@ def main(): #check if compressed, in that case dump was finished previously compressed = False for f in os.listdir('.'): - if f.startswith(prefix) and f.endswith('.7z'): + if f.endswith('.7z') and f.split("-")[0] == prefix: compressed = True zipfilename = f break #stop searching, dot not explore subdirectories @@ -71,7 +71,7 @@ def main(): wikidir = '' for f in os.listdir('.'): # Does not find numbered wikidumps not verify directories - if f.startswith(prefix) and f.endswith('wikidump'): + if f.endswith('wikidump') and f.split("-")[0] == prefix: wikidir = f started = True break #stop searching, dot not explore subdirectories @@ -89,7 +89,7 @@ def main(): #save wikidir now for f in os.listdir('.'): # Does not find numbered wikidumps not verify directories - if f.startswith(prefix) and f.endswith('wikidump'): + if f.endswith('wikidump') and f.split("-")[0] == prefix: wikidir = f break #stop searching, dot not explore subdirectories