summaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 23:26:25 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-20 23:28:44 -0700
commit136282f88a28e11f6bfa26750a85b5f1e2bf8be3 (patch)
treec41af534b4f46b546584999e138a61f3b0723a71 /uemis-downloader.c
parent79f15e913b9029205686ef6c080eb136ff99e0cf (diff)
downloadsubsurface-136282f88a28e11f6bfa26750a85b5f1e2bf8be3.tar.gz
Uemis downloader: even with an empty divelist, check where to start
If the user hits retry from within the download dialog, the dive list might still be empty but we still have to look for the best point to restart. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 7fae71f26..8df95fc1b 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -881,9 +881,9 @@ const char *do_uemis_import(device_data_t *data)
if (import_thread_cancelled)
goto bail;
param_buff[1] = "notempty";
- /* if we have an empty divelist or force it, then we start downloading from the
- * first dive on the Uemis; otherwise check which was the last dive downloaded */
- if (!force_download && dive_table.nr > 0)
+ /* if we force it we start downloading from the first dive on the Uemis;
+ * otherwise check which was the last dive downloaded */
+ if (!force_download)
newmax = uemis_get_divenr(deviceid);
else
newmax = strdup("0");