summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorHenrik Backe <henrik@backe.eu>2004-09-10 20:51:12 +0000
committerHenrik Backe <henrik@backe.eu>2004-09-10 20:51:12 +0000
commit66b45eeb596af1bd950832cd16b3752430f691c4 (patch)
tree25f5f0efe604a04842cce72a09001f1f9573cd0f /apps/tree.c
parent7a9910ccb9d67aed276778cf1bdb48ebcc3fed38 (diff)
downloadrockbox-66b45eeb596af1bd950832cd16b3752430f691c4.tar.gz
rockbox-66b45eeb596af1bd950832cd16b3752430f691c4.zip
Added check for missing .rockbox directory to playlist code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5063 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c19
1 files changed, 13 insertions, 6 deletions
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;
120static bool start_wps = false; 120static bool start_wps = false;
121static bool dirbrowse(const char *root, const int *dirfilter); 121static bool dirbrowse(const char *root, const int *dirfilter);
122 122
123void browse_root(void) 123bool 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
138void 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