1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

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>
This commit is contained in:
Dirk Hohndel 2015-04-20 23:26:25 -07:00
parent 79f15e913b
commit 136282f88a

View file

@ -881,9 +881,9 @@ const char *do_uemis_import(device_data_t *data)
if (import_thread_cancelled) if (import_thread_cancelled)
goto bail; goto bail;
param_buff[1] = "notempty"; param_buff[1] = "notempty";
/* if we have an empty divelist or force it, then we start downloading from the /* if we force it we start downloading from the first dive on the Uemis;
* first dive on the Uemis; otherwise check which was the last dive downloaded */ * otherwise check which was the last dive downloaded */
if (!force_download && dive_table.nr > 0) if (!force_download)
newmax = uemis_get_divenr(deviceid); newmax = uemis_get_divenr(deviceid);
else else
newmax = strdup("0"); newmax = strdup("0");