From fef4e6b057eccf41e71d5e865cac42494beafe29 Mon Sep 17 00:00:00 2001 From: vdalv Date: Tue, 15 May 2018 22:25:46 -0700 Subject: [PATCH] Fix file save issue - #293 --- labelImg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/labelImg.py b/labelImg.py index 01b6ea69..c0ced08e 100755 --- a/labelImg.py +++ b/labelImg.py @@ -1277,7 +1277,8 @@ class MainWindow(QMainWindow, WindowMixin): dlg.selectFile(filenameWithoutExtension) dlg.setOption(QFileDialog.DontUseNativeDialog, False) if dlg.exec_(): - return dlg.selectedFiles()[0] + fullFilePath = dlg.selectedFiles()[0] + return os.path.splitext(fullFilePath)[0] # Return file path without the extension. return '' def _saveFile(self, annotationFilePath):