]> mj.ucw.cz Git - leo.git/commitdiff
XML import now skips elements marked as deleted
authorMartin Mares <mj@ucw.cz>
Tue, 2 Jun 2015 13:20:35 +0000 (15:20 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 7 Jun 2015 13:18:45 +0000 (15:18 +0200)
xml.c

diff --git a/xml.c b/xml.c
index 69e739d06915121f8f34e95a73368e62dd219912..04c89481899cb887c156fe5858f5af4072a32ef2 100644 (file)
--- a/xml.c
+++ b/xml.c
@@ -151,6 +151,11 @@ static void h_error(struct xml_context *ctx)
 
 static void parse_element(struct xml_context *ctx, struct xml_node *e)
 {
+  // JOSM marks deleted, but not uploaded, objects
+  char *action = xml_attr_value(ctx, e, "action");
+  if (action && !strcmp(action, "delete"))
+    return;
+
   if (!strcmp(e->name, "node"))
     parse_node(ctx, e);
   else if (!strcmp(e->name, "way"))