Pārlūkot izejas kodu

dblinks in other mapsets are OK because we won't be able to overwrite them anyway

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60047 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 gadi atpakaļ
vecāks
revīzija
6732b5a52a
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4 3
      vector/v.in.db/main.c

+ 4 - 3
vector/v.in.db/main.c

@@ -121,14 +121,15 @@ int main(int argc, char *argv[])
 	 * vector. */
 	char name[GNAME_MAX], mapset[GMAPSET_MAX];
 
-	if (G_name_is_fully_qualified(outvect->answer, name, mapset)) {
-	} else {
+	if (!G_name_is_fully_qualified(outvect->answer, name, mapset)) {
 	    strcpy(name, outvect->answer);
 	    strcpy(mapset, G_mapset());
 	}
 
 	Vect_set_open_level(1); /* no topo needed */
-	if (G_find_vector2(name, mapset) && Vect_open_old(&Map, name, mapset)) {
+
+	if (strcmp(mapset, G_mapset()) == 0 && G_find_vector2(name, mapset) &&
+	    Vect_open_old(&Map, name, mapset)) {
 	    int num_dblinks;
 
 	    num_dblinks = Vect_get_num_dblinks(&Map);