[GRASS-SVN] r60047 - grass/trunk/vector/v.in.db

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 2 09:39:18 PDT 2014


Author: hcho
Date: 2014-05-02 09:39:18 -0700 (Fri, 02 May 2014)
New Revision: 60047

Modified:
   grass/trunk/vector/v.in.db/main.c
Log:
dblinks in other mapsets are OK because we won't be able to overwrite them anyway

Modified: grass/trunk/vector/v.in.db/main.c
===================================================================
--- grass/trunk/vector/v.in.db/main.c	2014-05-02 16:30:15 UTC (rev 60046)
+++ grass/trunk/vector/v.in.db/main.c	2014-05-02 16:39:18 UTC (rev 60047)
@@ -121,14 +121,15 @@
 	 * 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);



More information about the grass-commit mailing list