Pārlūkot izejas kodu

vlib: continue in deleting vector map even linked table not found or unable to delete

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59568 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 gadi atpakaļ
vecāks
revīzija
7425783c0c
1 mainītis faili ar 15 papildinājumiem un 6 dzēšanām
  1. 15 6
      lib/vector/Vlib/map.c

+ 15 - 6
lib/vector/Vlib/map.c

@@ -440,8 +440,11 @@ int Vect__delete(const char *map, int is_tmp)
                 if (Fi == NULL) {
                     G_warning(_("Database connection not defined for layer %d"),
                               Map.dblnk->field[i].number);
-                    Vect_close(&Map);
-                    return -1;
+                    /* 
+                       Vect_close(&Map);
+                       return -1;
+                    */
+                    continue;
                 }
                 G_debug(3, "Delete drv:db:table '%s:%s:%s'", Fi->driver,
                         Fi->database, Fi->table);
@@ -450,8 +453,11 @@ int Vect__delete(const char *map, int is_tmp)
                 if (ret == -1) {
                     G_warning(_("Unable to find table <%s> linked to vector map <%s>"),
                               Fi->table, map);
-                    Vect_close(&Map);
-                    return -1;
+                    /* 
+                       Vect_close(&Map);
+                       return -1;
+                    */
+                    continue;
                 }
 
                 if (ret == 1) {
@@ -460,8 +466,11 @@ int Vect__delete(const char *map, int is_tmp)
                     if (ret == DB_FAILED) {
                         G_warning(_("Unable to delete table <%s>"),
                                   Fi->table);
-                        Vect_close(&Map);
-                        return -1;
+                        /*
+                          Vect_close(&Map);
+                          return -1;
+                        */
+                        continue;
                     }
                 }
                 else {