diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-08-18 03:00:47 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-08-18 03:00:47 +0000 |
commit | 4293482bf03bfda2dcc8929d1b5ed5efff1456e2 (patch) | |
tree | 031279e0df67e222e1b78aba740e4e240ade146c /apps/playlist_catalog.c | |
parent | 5119b18e9307e0730eb1465422cf9c689b79687c (diff) | |
download | rockbox-4293482bf03bfda2dcc8929d1b5ed5efff1456e2.tar.gz rockbox-4293482bf03bfda2dcc8929d1b5ed5efff1456e2.zip |
create the playlist directory instead of warning it doesnt exist when entering the playlist cataloge
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10640 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r-- | apps/playlist_catalog.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 55af178ee4..87034aad3b 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -111,14 +111,20 @@ static int initialize_catalog(void) | |||
111 | 111 | ||
112 | if (!playlist_dir_exists) | 112 | if (!playlist_dir_exists) |
113 | { | 113 | { |
114 | gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), | 114 | if (mkdir(playlist_dir, 0) < 0) { |
115 | playlist_dir); | 115 | gui_syncsplash(HZ*2, true, str(LANG_CATALOG_NO_DIRECTORY), |
116 | return -1; | 116 | playlist_dir); |
117 | return -1; | ||
118 | } | ||
119 | else { | ||
120 | playlist_dir_exists = true; | ||
121 | memset(most_recent_playlist, 0, sizeof(most_recent_playlist)); | ||
122 | initialized = true; | ||
123 | } | ||
117 | } | 124 | } |
118 | 125 | ||
119 | return 0; | 126 | return 0; |
120 | } | 127 | } |
121 | |||
122 | /* Use the filetree functions to retrieve the list of playlists in the | 128 | /* Use the filetree functions to retrieve the list of playlists in the |
123 | directory */ | 129 | directory */ |
124 | static int create_playlist_list(char** playlists, int num_items, | 130 | static int create_playlist_list(char** playlists, int num_items, |