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
This commit is contained in:
Thomas Martitz 2010-08-02 19:13:22 +00:00
parent 75556fd57f
commit 850efead04
3 changed files with 19 additions and 12 deletions

View file

@ -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)