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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Oct 17 10:54:17 EDT 2009


Author: mmetz
Date: 2009-10-17 10:54:16 -0400 (Sat, 17 Oct 2009)
New Revision: 39545

Modified:
   grass/trunk/lib/vector/Vlib/close.c
Log:
always close sidx file if exists

Modified: grass/trunk/lib/vector/Vlib/close.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close.c	2009-10-17 12:22:33 UTC (rev 39544)
+++ grass/trunk/lib/vector/Vlib/close.c	2009-10-17 14:54:16 UTC (rev 39545)
@@ -105,10 +105,10 @@
     }
     else {
 	/* spatial index must also be closed when opened with topo but not modified */
-	if (Map->format == GV_FORMAT_NATIVE &&
-	    Map->plus.Spidx_built == 1 &&
-	    Map->plus.built == GV_BUILD_ALL)
-	    Vect_save_sidx(Map);
+	/* NOTE: also close sidx for GV_FORMAT_OGR if not direct OGR access */
+	if (Map->plus.Spidx_built == 1 && Map->plus.built == GV_BUILD_ALL)
+	    if (strcasecmp(Map->mapset, "ogr") != 0)
+		Vect_save_sidx(Map);
     }
 
     if (Map->level == 2 && Map->plus.release_support) {



More information about the grass-commit mailing list