diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-08-02 19:13:22 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-08-02 19:13:22 +0000 |
commit | 850efead04f10488b478a0f255a2464a01156a7f (patch) | |
tree | 44539bf63d893479c83f8cee8c4a9ca09b773dc5 /apps/filetypes.c | |
parent | 75556fd57ff70be9a9cbc183cbacb71db520291d (diff) | |
download | rockbox-850efead04f10488b478a0f255a2464a01156a7f.tar.gz rockbox-850efead04f10488b478a0f255a2464a01156a7f.zip |
A few post-fixes to the get_user_file_path() commit.
Remove unneeded restriction from set_file that prevented filename settings to
work if they were outside of ROCKBOX_DIR.
Add the get_user_file_path() call to a few further places where it was
forgotten.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27667 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r-- | apps/filetypes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 67a4c176fb..28a2da65bb 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -182,14 +182,15 @@ 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]; + char buffer[MAX_PATH], dir[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", THEME_DIR, + snprintf(buffer, MAX_PATH, "%s/%s.colours", + get_user_file_path(THEME_DIR, 0, dir, sizeof(dir)), global_settings.colors_file); fd = open(buffer, O_RDONLY); if (fd < 0) |