[GRASS-SVN] r45538 - grass/branches/releasebranch_6_4/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 3 14:32:32 EST 2011


Author: martinl
Date: 2011-03-03 11:32:32 -0800 (Thu, 03 Mar 2011)
New Revision: 45538

Modified:
   grass/branches/releasebranch_6_4/lib/vector/Vlib/field.c
Log:
vlib: field.c: normalize path for Windows

Modified: grass/branches/releasebranch_6_4/lib/vector/Vlib/field.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Vlib/field.c	2011-03-03 19:05:59 UTC (rev 45537)
+++ grass/branches/releasebranch_6_4/lib/vector/Vlib/field.c	2011-03-03 19:32:32 UTC (rev 45538)
@@ -746,8 +746,15 @@
     G_debug(3, "Vect_subst_var(): in = %s, map = %s, mapset = %s", in,
 	    Map->name, Map->mapset);
 
+#ifdef __MINGW32__
+    char *cin;
+    cin = G_str_replace((char *)in, "/", "\\");
+    strcpy(str, cin);
+    G_free(cin);
+#else
     strcpy(str, in);
-
+#endif
+    
     strcpy(buf, str);
     c = (char *)strstr(buf, "$GISDBASE");
     if (c != NULL) {



More information about the grass-commit mailing list