From 8b1036eaddd3f9948e7f6b390002f7c5aaafb68c Mon Sep 17 00:00:00 2001 From: Michael Litvin Date: Tue, 7 Sep 2021 02:40:29 +0300 Subject: [PATCH] os.path.normpath filenames to display paths correctly on Windows (cherry picked from commit e2778cb31c8027371ba48b81b5a03e80cc6bc2ad) --- labelme/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labelme/app.py b/labelme/app.py index 4182770f4..1dae25c53 100644 --- a/labelme/app.py +++ b/labelme/app.py @@ -2143,7 +2143,7 @@ def scanAllImages(self, folderPath): for root, dirs, files in os.walk(folderPath): for file in files: if file.lower().endswith(tuple(extensions)): - relativePath = osp.join(root, file) + relativePath = os.path.normpath(osp.join(root, file)) images.append(relativePath) images = natsort.os_sorted(images) return images