Ignore hidden files when captioning
This commit is contained in:
@@ -148,7 +148,7 @@ class BaseCaptioner(BaseExtensionProcess):
|
|||||||
for root, dirs, files in os.walk(self.caption_config.path_to_caption):
|
for root, dirs, files in os.walk(self.caption_config.path_to_caption):
|
||||||
for file in files:
|
for file in files:
|
||||||
if any(
|
if any(
|
||||||
file.lower().endswith(f".{ext}")
|
file.lower().endswith(f".{ext}") and not file.startswith(".")
|
||||||
for ext in self.caption_config.extensions
|
for ext in self.caption_config.extensions
|
||||||
):
|
):
|
||||||
full_path = os.path.join(root, file)
|
full_path = os.path.join(root, file)
|
||||||
|
|||||||
Reference in New Issue
Block a user