Remove skip directory condition when directory keywords are empty. Here, all paths to files should be considered.

This commit is contained in:
2025-02-07 16:37:01 +01:00
parent f986edd4a5
commit b58e205f9f

View File

@ -319,7 +319,7 @@ def copy_directory_with_contraints(input_dir_path, output_dir_path,
for dirpath, _, filenames in os.walk(subpath,topdown=False): for dirpath, _, filenames in os.walk(subpath,topdown=False):
# Ensure composite keywords e.g., <keyword>/<keyword> are contained in the path # Ensure composite keywords e.g., <keyword>/<keyword> are contained in the path
if not any([keyword in dirpath for keyword in select_dir_keywords]): if select_dir_keywords and not any([keyword in dirpath for keyword in select_dir_keywords]):
continue continue
# Reduce filenames to those that are admissible # Reduce filenames to those that are admissible