summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse-xml.c b/parse-xml.c
index a02c4afac..819d3a8ca 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -24,6 +24,7 @@ int metric = 1;
int last_xml_version = -1;
bool abort_read_of_old_file = false;
bool v2_question_shown = false;
+bool imported_via_xslt = false;
static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params);
@@ -1681,7 +1682,7 @@ static bool entry(const char *name, char *buf)
if (!strncmp(name, "version.program", sizeof("version.program") - 1) ||
!strncmp(name, "version.divelog", sizeof("version.divelog") - 1)) {
last_xml_version = atoi(buf);
- if (last_xml_version < 3 && !v2_question_shown) {
+ if (last_xml_version < 3 && !v2_question_shown && !imported_via_xslt) {
// let's ask the user what they want to do about reverse geo coding
// and warn them that opening older XML files can take a while
// since C code shouldn't call the UI we set a global flag and bail
@@ -1953,7 +1954,7 @@ int parse_xml_buffer(const char *url, const char *buffer, int size,
}
dive_end();
xmlFreeDoc(doc);
-
+ imported_via_xslt = false;
return ret;
}
@@ -3154,7 +3155,7 @@ static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params)
}
free((void *)attribute);
}
-
+ imported_via_xslt = true;
xmlSubstituteEntitiesDefault(1);
xslt = get_stylesheet(info->file);
if (xslt == NULL) {