From 2c2416094f426972c9e2e96d25058311bbe82f97 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 6 Dec 2010 22:26:31 +0000 Subject: Get rid of get_user_file_path and do the path handling in wrappers for open() and friends. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657 --- apps/filetypes.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apps/filetypes.c') diff --git a/apps/filetypes.c b/apps/filetypes.c index f23026e..481c0df 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -219,15 +219,14 @@ static void read_config(const char* config_file); * load a colors file from a theme with: * filetype colours: filename.colours */ void read_color_theme_file(void) { - char buffer[MAX_PATH], dir[MAX_PATH]; + char buffer[MAX_PATH]; int fd; char *ext, *color; int i; for (i = 0; i < MAX_FILETYPES+1; i++) { custom_colors[i] = -1; } - snprintf(buffer, MAX_PATH, "%s/%s.colours", - get_user_file_path(THEME_DIR, 0, dir, sizeof(dir)), + snprintf(buffer, MAX_PATH, THEME_DIR "/%s.colours", global_settings.colors_file); fd = open(buffer, O_RDONLY); if (fd < 0) @@ -300,7 +299,6 @@ void read_viewer_theme_file(void) void filetype_init(void) { - char path[MAX_PATH]; /* set the directory item first */ filetypes[0].extension = NULL; filetypes[0].plugin = NULL; @@ -310,7 +308,7 @@ void filetype_init(void) viewer_count = 0; filetype_count = 1; read_builtin_types(); - read_config(get_user_file_path(VIEWERS_CONFIG, IS_FILE, path, sizeof(path))); + read_config(VIEWERS_CONFIG); #ifdef HAVE_LCD_BITMAP read_viewer_theme_file(); #endif -- cgit v1.1