Эх сурвалжийг харах

os.path.normpath filenames to display paths correctly on Windows

(cherry picked from commit e2778cb31c8027371ba48b81b5a03e80cc6bc2ad)
Michael Litvin 3 жил өмнө
parent
commit
ec88ffedd0
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      labelme/app.py

+ 1 - 1
labelme/app.py

@@ -2081,7 +2081,7 @@ class MainWindow(QtWidgets.QMainWindow):
         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