[GRASS-SVN] r39451 - in grass/trunk/lib/db: dbmi_base dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 8 19:30:24 EDT 2009


Author: hamish
Date: 2009-10-08 19:30:23 -0400 (Thu, 08 Oct 2009)
New Revision: 39451

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

Modified: grass/trunk/lib/db/dbmi_base/dbmscap.c
===================================================================
--- grass/trunk/lib/db/dbmi_base/dbmscap.c	2009-10-08 23:27:27 UTC (rev 39450)
+++ grass/trunk/lib/db/dbmi_base/dbmscap.c	2009-10-08 23:30:23 UTC (rev 39451)
@@ -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/trunk/lib/db/dbmi_client/start.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/start.c	2009-10-08 23:27:27 UTC (rev 39450)
+++ grass/trunk/lib/db/dbmi_client/start.c	2009-10-08 23:30:23 UTC (rev 39451)
@@ -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