From 31291b1c56bf418732cf6ef52550aada492eff9b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 3 Mar 2019 18:39:12 +0100 Subject: Dive site: set UUID only on save or load Since the UUID will be overwritten on save and is only used on save and load, set it only on save or load. For other created dive sites, leave the UUID field uninitialized. This means that the UUID will change between saves. Let's see how the git saver handles that. Signed-off-by: Berthold Stoeger --- core/import-divinglog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/import-divinglog.c') diff --git a/core/import-divinglog.c b/core/import-divinglog.c index 9ebd2b8ed..7716ddf8e 100644 --- a/core/import-divinglog.c +++ b/core/import-divinglog.c @@ -287,7 +287,7 @@ static int divinglog_dive(void *param, int columns, char **data, char **column) state->cur_dive->when = (time_t)(atol(data[1])); if (data[2]) - state->cur_dive->dive_site = find_or_create_dive_site_with_name(data[2], state->cur_dive->when, state->sites); + state->cur_dive->dive_site = find_or_create_dive_site_with_name(data[2], state->sites); if (data[3]) utf8_string(data[3], &state->cur_dive->buddy); -- cgit v1.2.3-70-g09d2