From 0a263f665ceb1f20cb812438f6874635b5126b40 Mon Sep 17 00:00:00 2001 From: Hakusai Zhang Date: Sat, 8 Jul 2023 18:20:30 +0800 Subject: [PATCH] only process file with suffix, not directory. --- Movie_Data_Capture.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Movie_Data_Capture.py b/Movie_Data_Capture.py index a96657a..aece3c4 100644 --- a/Movie_Data_Capture.py +++ b/Movie_Data_Capture.py @@ -351,6 +351,8 @@ def movie_lists(source_folder, regexstr: str) -> typing.List[str]: for full_name in source.glob(r'**/*'): if main_mode != 3 and set(full_name.parent.parts) & escape_folder_set: continue + if not full_name.is_file(): + continue if not full_name.suffix.lower() in file_type: continue absf = str(full_name)