File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -344,7 +344,9 @@ def delete_listed_directories(path: str) -> None:
344344 if not os .path .isdir (entry_path ): # Verify if current entry is not a directory
345345 continue # Skip non-directory entries
346346
347- if entry .lower () not in target_names : # Verify if directory name is not a Foto target
347+ normalized_entry = entry .casefold ().strip () # Normalize entry name for case-insensitive comparison and trim surrounding whitespace
348+
349+ if normalized_entry not in target_names : # Verify if normalized directory name is not a Foto target
348350 continue # Skip non-target directories
349351
350352 try : # Protect recursive directory deletion
@@ -380,7 +382,9 @@ def move_video_contents_to_parent(path: str) -> None:
380382 if not os .path .isdir (source_directory_path ): # Verify if current entry is not a directory
381383 continue # Skip non-directory entries
382384
383- if entry .lower () not in target_names : # Verify if directory name is not a Video target
385+ normalized_entry = entry .casefold ().strip () # Normalize entry name for case-insensitive comparison and trim surrounding whitespace
386+
387+ if normalized_entry not in target_names : # Verify if normalized directory name is not a Video target
384388 continue # Skip non-target directories
385389
386390 try : # Protect source directory content listing
You can’t perform that action at this time.
0 commit comments