Skip to content
Snippets Groups Projects
Commit c0fb3a00 authored by Lan Dam's avatar Lan Dam
Browse files

fix bug for path's name when saving GPS file

parent c20000d0
No related branches found
No related tags found
1 merge request!162fix bug for path's name when saving GPS file
Pipeline #2903 passed with stage
in 2 minutes and 48 seconds
...@@ -190,7 +190,7 @@ class GPSDialog(QtWidgets.QWidget): ...@@ -190,7 +190,7 @@ class GPSDialog(QtWidgets.QWidget):
super().__init__() super().__init__()
self.parent = parent self.parent = parent
self.data_path: Optional[Path] = None self.data_path: Optional[Path, str] = None
# The directory the GPS will be exported to. By default, this will be # The directory the GPS will be exported to. By default, this will be
# the folder that contains the data set. # the folder that contains the data set.
self.export_path: Path = Path.home() self.export_path: Path = Path.home()
...@@ -353,8 +353,10 @@ class GPSDialog(QtWidgets.QWidget): ...@@ -353,8 +353,10 @@ class GPSDialog(QtWidgets.QWidget):
msg = 'There is no GPS data to export.' msg = 'There is no GPS data to export.'
display_tracking_info(self.info_text_browser, msg, LogType.ERROR) display_tracking_info(self.info_text_browser, msg, LogType.ERROR)
return return
try:
folder_name = self.data_path.name folder_name = self.data_path.name
except AttributeError:
folder_name = self.data_path
export_file_path = self.export_path / f'{folder_name}.gps.dat' export_file_path = self.export_path / f'{folder_name}.gps.dat'
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment