Fix filename bug
If the file name contains ".", it will go wrong. e.g. hello.world.jpg --> hello.xml
This commit is contained in:
parent
14edc88a64
commit
a878ab83b7
@ -945,7 +945,7 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
xmlPath = os.path.join(self.defaultSaveDir, basename)
|
||||
self.loadPascalXMLByFilename(xmlPath)
|
||||
else:
|
||||
xmlPath = filePath.split(".")[0] + XML_EXT
|
||||
xmlPath = os.path.splitext(filePath)[0] + XML_EXT
|
||||
if os.path.isfile(xmlPath):
|
||||
self.loadPascalXMLByFilename(xmlPath)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user