[GRASS-SVN] r39450 - in grass/branches/develbranch_6/lib/db: dbmi_base dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 8 19:27:28 EDT 2009


Author: hamish
Date: 2009-10-08 19:27:27 -0400 (Thu, 08 Oct 2009)
New Revision: 39450

Modified:
   grass/branches/develbranch_6/lib/db/dbmi_base/dbmscap.c
   grass/branches/develbranch_6/lib/db/dbmi_client/start.c
Log:
use G_convert_dirseps_to_host(), dbg msg cosmetics (trac #629)

Modified: grass/branches/develbranch_6/lib/db/dbmi_base/dbmscap.c
===================================================================
--- grass/branches/develbranch_6/lib/db/dbmi_base/dbmscap.c	2009-10-08 23:14:15 UTC (rev 39449)
+++ grass/branches/develbranch_6/lib/db/dbmi_base/dbmscap.c	2009-10-08 23:27:27 UTC (rev 39450)
@@ -148,11 +148,12 @@
 #ifdef __MINGW32__
     dirpath = G_malloc(strlen("\\driver\\db\\") + strlen(G_gisbase()) + 1);
     sprintf(dirpath, "%s\\driver\\db\\", G_gisbase());
+    G_convert_dirseps_to_host(dirpath);
 #else
     G_asprintf(&dirpath, "%s/driver/db/", G_gisbase());
 #endif
 
-    G_debug(2, "opendir %s\n", dirpath);
+    G_debug(2, "dbDbmscap(): opendir [%s]", dirpath);
     dir = opendir(dirpath);
     if (dir == NULL) {
 	db_syserror("Cannot open drivers directory");
@@ -175,6 +176,7 @@
 	dirpath = G_malloc(strlen("\"\\driver\\db\\\"")
 			   + strlen(G_gisbase()) + strlen(ent->d_name) + 1);
 	sprintf(dirpath, "\"%s\\driver\\db\\%s\"", G_gisbase(), ent->d_name);
+	G_convert_dirseps_to_host(dirpath);
 #else
 	G_asprintf(&dirpath, "\"%s/driver/db/%s\"", G_gisbase(), ent->d_name);
 #endif

Modified: grass/branches/develbranch_6/lib/db/dbmi_client/start.c
===================================================================
--- grass/branches/develbranch_6/lib/db/dbmi_client/start.c	2009-10-08 23:14:15 UTC (rev 39449)
+++ grass/branches/develbranch_6/lib/db/dbmi_client/start.c	2009-10-08 23:27:27 UTC (rev 39450)
@@ -217,7 +217,7 @@
      *    descriptors in driver (which is another problem)
      */
 
-    G_debug(2,"dbmi_client/start startup: %s", startup);
+    G_debug(2, "dbmi_client/start startup: [%s]", startup);
     pid = _spawnl(_P_NOWAIT, startup, startup, NULL);
 
     /* This does not help. It runs but pipe remains open when close() is 



More information about the grass-commit mailing list