From e2b7d12a5bfb03cf1ff1af2f1c365463f15d1ec8 Mon Sep 17 00:00:00 2001 From: portix Date: Mon, 19 Mar 2012 01:26:52 +0100 Subject: Branch refactor: Use an anonymous, readonly object for hints --HG-- branch : refactor --- src/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 0e09713d..191497e2 100644 --- a/src/util.c +++ b/src/util.c @@ -411,20 +411,20 @@ util_get_user_data_dir(const char *dir) { /* util_get_data_file(const char *filename) return: filename (alloc) or NULL {{{*/ char * -util_get_data_file(const char *filename) { +util_get_data_file(const char *filename, const char *dir) { if (filename == NULL) return NULL; char *path = NULL; char *ret = NULL; char *basename = g_path_get_basename(filename); - path = util_get_user_data_dir("lib"); + path = util_get_user_data_dir(dir); if (path != NULL) { ret = g_build_filename(path, basename, NULL); if (g_file_test(ret, G_FILE_TEST_EXISTS)) goto clean; } - path = util_get_system_data_dir("lib"); + path = util_get_system_data_dir(dir); if (path != NULL) { ret = g_build_filename(path, basename, NULL); if (g_file_test(ret, G_FILE_TEST_EXISTS)) -- cgit v1.2.3