summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-30 16:35:46 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-30 16:35:46 -0700
commit5810aedeac5cbcc2500d6bbe9c65aea6b1c40a8c (patch)
tree6585e95cd500acff98f23d7c0451685a2960c11b /qt-ui
parentf647e3cf1e7f6782e18a6819d99e8f5731861dcd (diff)
downloadsubsurface-5810aedeac5cbcc2500d6bbe9c65aea6b1c40a8c.tar.gz
Uemis downloader: clean up the path for Windows mount point
Oops, we left the (UEMISSDA) in the path. This can never have worked without the user manually correcting it to just show the drive letter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index 04c78b998..c59fb0d7b 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -305,10 +305,20 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked()
thread->deleteLater();
}
- data.devname = strdup(ui.device->currentText().toUtf8().data());
data.vendor = strdup(ui.vendor->currentText().toUtf8().data());
data.product = strdup(ui.product->currentText().toUtf8().data());
+ if (same_string(data.vendor, "Uemis")) {
+ char *colon;
+ char *devname = strdup(ui.device->currentText().toUtf8().data());
+ if ((colon = strstr(devname, ":\\ (UEMISSDA)")) != NULL) {
+ *(colon + 2) = '\0';
+ fprintf(stderr, "shortened devname to \"%s\"", data.devname);
+ }
+ data.devname = devname;
+ } else {
+ data.devname = strdup(ui.device->currentText().toUtf8().data());
+ }
data.descriptor = descriptorLookup[ui.vendor->currentText() + ui.product->currentText()];
data.force_download = ui.forceDownload->isChecked();
data.create_new_trip = ui.createNewTrip->isChecked();