]> mj.ucw.cz Git - leo.git/blobdiff - xml.c
TODO
[leo.git] / xml.c
diff --git a/xml.c b/xml.c
index 69e739d06915121f8f34e95a73368e62dd219912..b4fbeb937dbdfa86848c864d1fc448717ccac8f2 100644 (file)
--- a/xml.c
+++ b/xml.c
@@ -6,7 +6,9 @@
 
 #undef LOCAL_DEBUG
 
-#include <ucw/lib.h>
+#include "leo.h"
+#include "osm.h"
+
 #include <ucw/fastbuf.h>
 #include <ucw-xml/xml.h>
 
@@ -14,9 +16,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "leo.h"
-#include "osm.h"
-
 static void parse_tag(struct xml_context *ctx, struct osm_object *o, struct xml_node *t)
 {
   char *tag_k = xml_attr_value(ctx, t, "k");
@@ -151,6 +150,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"))