r14777 - gnucash/trunk/src - Change the searchpath separator to glib macro so that on Windows, '; ' is used. Also clean up more path creation functions.
Christian Stimming
cstim at cvs.gnucash.org
Fri Sep 1 11:26:49 EDT 2006
Author: cstim
Date: 2006-09-01 11:26:48 -0400 (Fri, 01 Sep 2006)
New Revision: 14777
Trac: http://svn.gnucash.org/trac/changeset/14777
Modified:
gnucash/trunk/src/backend/file/gnc-backend-file.c
gnucash/trunk/src/gnc-module/gnc-module.c
Log:
Change the searchpath separator to glib macro so that on Windows, ';' is used. Also clean up more path creation functions.
Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-backend-file.c 2006-09-01 15:25:25 UTC (rev 14776)
+++ gnucash/trunk/src/backend/file/gnc-backend-file.c 2006-09-01 15:26:48 UTC (rev 14777)
@@ -667,8 +667,7 @@
if (gnc_file_be_select_files (dent) == 0)
continue;
- /* G_DIR_SEPARATOR_S is "/" on unix and "\\" on windows. */
- name = g_strconcat(be->dirname, G_DIR_SEPARATOR_S, dent->d_name, NULL);
+ name = g_build_filename(be->dirname, dent->d_name, (char*)NULL);
len = strlen(name) - 4;
/* Is this file associated with the current data file */
Modified: gnucash/trunk/src/gnc-module/gnc-module.c
===================================================================
--- gnucash/trunk/src/gnc-module/gnc-module.c 2006-09-01 15:25:25 UTC (rev 14776)
+++ gnucash/trunk/src/gnc-module/gnc-module.c 2006-09-01 15:26:48 UTC (rev 14777)
@@ -87,7 +87,8 @@
break;
#endif
- case ':':
+ /* This is ':' on UNIX machines and ';' under Windows. */
+ case G_SEARCHPATH_SEPARATOR:
if(!escchar)
{
list = g_list_append(list, token->str);
@@ -228,9 +229,8 @@
{
/* get the full path name, then dlopen the library and see
* if it has the appropriate symbols to be a gnc_module */
- fullpath = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", (char *)(current->data),
- dent->d_name);
- /* G_DIR_SEPARATOR_S is "/" on unix and "\\" on windows. */
+ fullpath = g_build_filename((const gchar *)(current->data),
+ dent->d_name, (char*)NULL);
info = gnc_module_get_info(fullpath);
if(info)
More information about the gnucash-changes
mailing list