diff options
Diffstat (limited to 'core/save-xml.c')
-rw-r--r-- | core/save-xml.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/core/save-xml.c b/core/save-xml.c index 56504c4d3..fa71773c7 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -596,23 +596,9 @@ void save_dives_buffer(struct membuffer *b, const bool select_only, bool anonymi put_format(b, "<divesites>\n"); for (i = 0; i < dive_site_table.nr; i++) { struct dive_site *ds = get_dive_site(i); - if (!is_dive_site_used(ds, false)) { - /* Only write used dive sites */ + /* Only write used dive sites */ + if (!is_dive_site_used(ds, false)) continue; - } else if (ds->name && - (strncmp(ds->name, "Auto-created dive", 17) == 0 || - strncmp(ds->name, "New Dive", 8) == 0)) { - // these are the two default names for sites from - // the web service; if the site isn't used in any - // dive (really? you didn't rename it?), delete it - if (!is_dive_site_used(ds, false)) { - if (verbose) - fprintf(stderr, "Deleted unused auto-created dive site %s\n", ds->name); - delete_dive_site(ds); - i--; // since we just deleted that one - continue; - } - } if (select_only && !is_dive_site_used(ds, true)) continue; |