[GRASS-SVN] r51395 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 12 11:15:30 EDT 2012


Author: mmetz
Date: 2012-04-12 08:15:29 -0700 (Thu, 12 Apr 2012)
New Revision: 51395

Modified:
   grass/trunk/lib/vector/Vlib/open.c
Log:
Vlib: restore native vector format for new vector

Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c	2012-04-12 14:23:48 UTC (rev 51394)
+++ grass/trunk/lib/vector/Vlib/open.c	2012-04-12 15:15:29 UTC (rev 51395)
@@ -693,6 +693,7 @@
     }
 
     /* determine output format native or ogr */
+    Map->format = GV_FORMAT_NATIVE;
     if (strcmp(G_program_name(), "v.external") != 0) {
 	if (G_find_file2("", "OGR", G_mapset())) {
 	    /* OGR */
@@ -785,10 +786,9 @@
 	    }
 	}
     }
-    else {
+    if (Map->format == GV_FORMAT_NATIVE) {
 	/* native */
 	G_debug(2, " using native format");
-	Map->format = GV_FORMAT_NATIVE;
 
 	/* check if map already exists */
 	if (G_find_vector2(name, G_mapset()) != NULL) {



More information about the grass-commit mailing list