From a48def2646ccb2067431d59043b1c2a0eb9fe0f6 Mon Sep 17 00:00:00 2001 From: gyboth Date: Tue, 25 Nov 2008 14:31:35 +0000 Subject: [PATCH] Support dir argument bugfix. --- src/file.c | 2 +- src/main.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/file.c b/src/file.c index 8b88fce5..322891b1 100644 --- a/src/file.c +++ b/src/file.c @@ -80,7 +80,7 @@ file_add_support_directory_recursive (const gchar *directo G_DIR_SEPARATOR_S, file); if(g_file_test(fullpath, G_FILE_TEST_IS_DIR)) - file_add_support_directory_recursive(fullpath); + file_add_support_directory_recursive(fullpath); g_free(fullpath); } diff --git a/src/main.c b/src/main.c index 77b7c252..16c43a8c 100644 --- a/src/main.c +++ b/src/main.c @@ -144,7 +144,9 @@ main_parse_cl_arguments(gint *argc, gchar ***argv) if(support_dir != NULL) { - gchar *fullpath = g_path_get_dirname(support_dir); + gchar *fullpath = (support_dir[strlen(support_dir)] == G_DIR_SEPARATOR) ? + g_path_get_dirname(support_dir) : + g_strdup_printf("%s%s", support_dir, G_DIR_SEPARATOR_S); file_add_support_directory_recursive(fullpath); g_free(fullpath); g_free(support_dir);