From d03549de87d00a5df74fc48e48194fc3c553cd44 Mon Sep 17 00:00:00 2001 From: Wutipong Wongsakuldej Date: Sun, 29 Oct 2023 21:47:26 +0700 Subject: [PATCH] add glob.escape at load_images() --- WAS_Node_Suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index b6ce1d9..31f4cba 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -5116,7 +5116,7 @@ class WAS_Load_Image_Batch: self.label = label def load_images(self, directory_path, pattern): - for file_name in glob.glob(os.path.join(directory_path, pattern), recursive=True): + for file_name in glob.glob(os.path.join(glob.escape(directory_path), pattern), recursive=True): if file_name.lower().endswith(ALLOWED_EXT): abs_file_path = os.path.abspath(file_name) self.image_paths.append(abs_file_path)