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
This commit is contained in:
Thomas Martitz 2010-12-06 22:26:31 +00:00
parent c35b43b0f5
commit 2c2416094f
25 changed files with 311 additions and 288 deletions

View file

@ -81,11 +81,9 @@ static int initialize_catalog(void)
/* fall back to default directory if no or invalid config */
if (default_dir)
{
const char *dir = get_user_file_path(PLAYLIST_CATALOG_DEFAULT_DIR,
FORCE_BUFFER_COPY|NEED_WRITE,
playlist_dir, sizeof(playlist_dir));
if (!dir_exists(dir))
mkdir(dir);
strcpy(playlist_dir, PLAYLIST_CATALOG_DEFAULT_DIR);
if (!dir_exists(playlist_dir))
mkdir(playlist_dir);
}
playlist_dir_length = strlen(playlist_dir);