summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-20 18:44:10 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-20 18:44:14 -0400
commit16d9b0c790c1fb0dae6e001a3107fb4f82356e90 (patch)
treef5646762331b6216d55942969009f4b48a3af36c
parent9dd8726d12ab828ab5aa74a33014ac802ca71815 (diff)
downloadsubsurface-16d9b0c790c1fb0dae6e001a3107fb4f82356e90.tar.gz
DC download: fix 'no new dives' message
Stupidly, commit 731d9dc9bdf ("DC download: tell user when no new dives were found") was missing the conditional when to show that messages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/libdivecomputer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index e6b600644..beae7c521 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -1121,7 +1121,8 @@ const char *do_libdivecomputer_import(device_data_t *data)
/* TODO: Show the logfile to the user on error. */
dc_device_close(data->device);
data->device = NULL;
- dev_info(data, translate("gettextFromC", "No new dives downloaded from dive computer"));
+ if (!downloadTable.nr)
+ dev_info(data, translate("gettextFromC", "No new dives downloaded from dive computer"));
}
dc_context_free(data->context);