diff --git a/src/backend/file/gnc-backend-file.c b/src/backend/file/gnc-backend-file.c index df8d504900..8431423c88 100644 --- a/src/backend/file/gnc-backend-file.c +++ b/src/backend/file/gnc-backend-file.c @@ -667,8 +667,7 @@ gnc_file_be_remove_old_files(FileBackend *be) 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 */ diff --git a/src/gnc-module/gnc-module.c b/src/gnc-module/gnc-module.c index 0c0eba9faf..ed56b97730 100644 --- a/src/gnc-module/gnc-module.c +++ b/src/gnc-module/gnc-module.c @@ -87,7 +87,8 @@ gnc_module_system_search_dirs(void) 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 @@ gnc_module_system_refresh(void) { /* 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)