Fix hidden file detection issue

pull/1003/head
bmaltais 2023-06-15 20:01:37 -04:00
parent 7cf5285980
commit c1612c33c6
1 changed files with 4 additions and 2 deletions

View File

@ -1303,8 +1303,10 @@ def verify_image_folder_pattern(folder_path):
]
# Check if all sub-folders match the pattern
if len(matching_subfolders) != len(os.listdir(folder_path)):
log.error(f"Not all images folders have proper name patterns in {folder_path}. Please follow the folder structure documentation found at docs\image_folder_structure.md ...")
filenames = [filename for filename in os.listdir(folder_path) if not filename.startswith('.')]
if len(matching_subfolders) != len(filenames):
log.error(f"Not all image folders have proper name patterns <numbre>_<text> in {folder_path}. Please follow the folder structure documentation found at docs/image_folder_structure.md ...")
log.error(f"Only folders are allowed in {folder_path}...")
return False
# Check if no sub-folders exist