fix(data_dir): remove dot files everywhere

This commit is contained in:
2026-04-20 10:06:48 +02:00
parent 978b799ee8
commit fc7d3cb0e8
3 changed files with 16 additions and 4 deletions
+3 -2
View File
@@ -70,12 +70,13 @@ class DataDir:
shutil.rmtree(target_path)
self.logger.debug("Deleted %s", target_path)
tar_file.extractall(target_path, filter="data")
for target_file in target_path.iterdir():
if re.match(r"^\..*", target_file.name): # remove dot files
for target_file in target_path.rglob("*"):
if target_file.name.startswith("."): # remove dot files
if target_file.is_dir():
shutil.rmtree(target_file)
else:
target_file.unlink()
self.logger.debug("Removed %s", target_file)
self.logger.debug("Extracted tar to %s", target_path)
def remove(self, path: str) -> None: