bugfix: can not load xml with multiple dots file name such as xxx.xxx.xxx
This commit is contained in:
parent
f6663a6327
commit
83048cee65
@ -706,8 +706,9 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
## Label xml file and show bound box according to its filename
|
||||
if self.usingPascalVocFormat is True and \
|
||||
self.defaultSaveDir is not None:
|
||||
basename = os.path.basename(self.filename).split('.')[:-1][0]
|
||||
basename = os.path.basename(os.path.splitext(self.filename)[0])
|
||||
xmlPath = os.path.join(self.defaultSaveDir, basename + '.xml')
|
||||
print xmlPath
|
||||
self.loadPascalXMLByFilename(xmlPath)
|
||||
|
||||
return True
|
||||
@ -1039,6 +1040,7 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
if self.filename is None:
|
||||
return
|
||||
if os.path.exists(filename) is False:
|
||||
print filename + ': xml not exist'
|
||||
return
|
||||
|
||||
tVocParseReader = PascalVocReader(filename)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user