From 136282f88a28e11f6bfa26750a85b5f1e2bf8be3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 20 Apr 2015 23:26:25 -0700 Subject: 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 --- uemis-downloader.c | 6 +++--- 1 file 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"); -- cgit v1.2.3-70-g09d2