[GRASS-SVN] r39452 - in grass/branches/releasebranch_6_4/lib/db: dbmi_base dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 8 19:31:02 EDT 2009


Author: hamish
Date: 2009-10-08 19:31:02 -0400 (Thu, 08 Oct 2009)
New Revision: 39452

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

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