diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 13 | ||||
-rw-r--r-- | apps/tree.c | 19 | ||||
-rw-r--r-- | apps/tree.h | 1 |
3 files changed, 24 insertions, 9 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 8d4f62db68..5725c4be85 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -247,10 +247,17 @@ static void create_control(struct playlist_info* playlist) | |||
247 | playlist->control_fd = creat(playlist->control_filename, 0000200); | 247 | playlist->control_fd = creat(playlist->control_filename, 0000200); |
248 | if (playlist->control_fd < 0) | 248 | if (playlist->control_fd < 0) |
249 | { | 249 | { |
250 | splash(HZ*2, true, "%s (%d)", str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), | 250 | if (check_rockboxdir()) |
251 | playlist->control_fd); | 251 | { |
252 | splash(HZ*2, true, "%s (%d)", str(LANG_PLAYLIST_CONTROL_ACCESS_ERROR), | ||
253 | playlist->control_fd); | ||
254 | } | ||
255 | playlist->control_created = false; | ||
256 | } | ||
257 | else | ||
258 | { | ||
259 | playlist->control_created = true; | ||
252 | } | 260 | } |
253 | playlist->control_created = true; | ||
254 | } | 261 | } |
255 | 262 | ||
256 | /* | 263 | /* |
diff --git a/apps/tree.c b/apps/tree.c index 7be258c4db..90d7010d03 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -120,20 +120,27 @@ static bool boot_changed = false; | |||
120 | static bool start_wps = false; | 120 | static bool start_wps = false; |
121 | static bool dirbrowse(const char *root, const int *dirfilter); | 121 | static bool dirbrowse(const char *root, const int *dirfilter); |
122 | 122 | ||
123 | void browse_root(void) | 123 | bool check_rockboxdir(void) |
124 | { | 124 | { |
125 | filetype_init(); | ||
126 | |||
127 | #ifndef SIMULATOR | ||
128 | DIR *dir = opendir(ROCKBOX_DIR); | 125 | DIR *dir = opendir(ROCKBOX_DIR); |
129 | if(!dir) | 126 | if(!dir) |
130 | { | 127 | { |
131 | lcd_clear_display(); | 128 | lcd_clear_display(); |
132 | splash(HZ*5, true, str(LANG_NO_ROCKBOX_DIR)); | 129 | splash(HZ*2, true, str(LANG_NO_ROCKBOX_DIR)); |
133 | lcd_clear_display(); | 130 | lcd_clear_display(); |
134 | splash(HZ*5, true, str(LANG_INSTALLATION_INCOMPLETE)); | 131 | splash(HZ*2, true, str(LANG_INSTALLATION_INCOMPLETE)); |
132 | return false; | ||
135 | } | 133 | } |
136 | closedir(dir); | 134 | closedir(dir); |
135 | return true; | ||
136 | } | ||
137 | |||
138 | void browse_root(void) | ||
139 | { | ||
140 | filetype_init(); | ||
141 | check_rockboxdir(); | ||
142 | |||
143 | #ifndef SIMULATOR | ||
137 | dirbrowse("/", &global_settings.dirfilter); | 144 | dirbrowse("/", &global_settings.dirfilter); |
138 | 145 | ||
139 | #else | 146 | #else |
diff --git a/apps/tree.h b/apps/tree.h index 5a618a8bc3..dd08ca9392 100644 --- a/apps/tree.h +++ b/apps/tree.h | |||
@@ -59,5 +59,6 @@ char *getcwd(char *buf, int size); | |||
59 | void reload_directory(void); | 59 | void reload_directory(void); |
60 | struct entry* load_and_sort_directory(const char *dirname, const int *dirfilter, | 60 | struct entry* load_and_sort_directory(const char *dirname, const int *dirfilter, |
61 | int *num_files, bool *buffer_full); | 61 | int *num_files, bool *buffer_full); |
62 | bool check_rockboxdir(void); | ||
62 | 63 | ||
63 | #endif | 64 | #endif |