Kaynağa Gözat

use G_convert_dirseps_to_host(), dbg msg cosmetics (trac https://trac.osgeo.org/grass/ticket/629)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39451 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 15 yıl önce
ebeveyn
işleme
ea7e3b256d
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 3 1
      lib/db/dbmi_base/dbmscap.c
  2. 1 1
      lib/db/dbmi_client/start.c

+ 3 - 1
lib/db/dbmi_base/dbmscap.c

@@ -148,11 +148,12 @@ dbDbmscap *db_read_dbmscap(void)
 #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 @@ dbDbmscap *db_read_dbmscap(void)
 	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

+ 1 - 1
lib/db/dbmi_client/start.c

@@ -217,7 +217,7 @@ dbDriver *db_start_driver(const char *name)
      *    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