From d8da85b38bcc70cd4d9381a10586b1e1f580493e Mon Sep 17 00:00:00 2001 From: Gaetano Bonofiglio Date: Mon, 9 Jan 2023 11:40:00 +0100 Subject: [PATCH] fix file not found when `[` is in the filename --- library/train_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/train_util.py b/library/train_util.py index bad954c2..fcd9880d 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -715,7 +715,7 @@ def debug_dataset(train_dataset): def glob_images(dir, base): img_paths = [] for ext in IMAGE_EXTENSIONS: - img_paths.extend(glob.glob(os.path.join(dir, base + ext))) + img_paths.extend(glob.glob(glob.escape(os.path.join(dir, base + ext)))) return img_paths # endregion