[GRASS-SVN] r38643 - grass/trunk/lib/vector/diglib

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 8 06:37:01 EDT 2009


Author: mmetz
Date: 2009-08-08 06:37:01 -0400 (Sat, 08 Aug 2009)
New Revision: 38643

Modified:
   grass/trunk/lib/vector/diglib/spindex_rw.c
Log:
breaking backwards compatibility, sorry

Modified: grass/trunk/lib/vector/diglib/spindex_rw.c
===================================================================
--- grass/trunk/lib/vector/diglib/spindex_rw.c	2009-08-08 10:13:17 UTC (rev 38642)
+++ grass/trunk/lib/vector/diglib/spindex_rw.c	2009-08-08 10:37:01 UTC (rev 38643)
@@ -309,6 +309,16 @@
 		    " Consider to rebuild topology or upgrade GRASS."),
 		  ptr->spidx_Version_Major, ptr->spidx_Version_Minor);
     }
+    if (ptr->spidx_Version_Major < GV_SIDX_VER_MAJOR ||
+	(ptr->spidx_Version_Major == GV_SIDX_VER_MAJOR &&
+	ptr->spidx_Version_Minor < GV_SIDX_VER_MINOR)) {
+	/* The file was created by GRASS library with lower version than this one */
+	    G_fatal_error(_("Spatial index format version %d.%d is not "
+			    "supported by this release."
+			    " Please rebuild topology."),
+			  ptr->spidx_Version_Major, ptr->spidx_Version_Minor);
+	    return (-1);
+    }
 
     dig_init_portable(&(ptr->spidx_port), byte_order);
     dig_set_cur_port(&(ptr->spidx_port));



More information about the grass-commit mailing list