summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-27 10:33:09 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-27 10:33:09 +0000
commit79798ff5f30dea7419f360e197763abb3b46259a (patch)
treefc06addfd06c88337ccaca1ee79bda6809cf9cfd /apps/root_menu.c
parent194174a371b16dfc24960d1e33371c0a7ef1c2c2 (diff)
downloadrockbox-79798ff5f30dea7419f360e197763abb3b46259a.tar.gz
rockbox-79798ff5f30dea7419f360e197763abb3b46259a.tar.bz2
rockbox-79798ff5f30dea7419f360e197763abb3b46259a.zip
Make getcwd match the posix variant, make get_current_file() behave similar to it and add a few sanity checks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27903 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 7965673b67..7f882cdba3 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -252,7 +252,11 @@ static int browser(void* param)
switch ((intptr_t)param)
{
case GO_TO_FILEBROWSER:
- get_current_file(last_folder, MAX_PATH);
+ if (!get_current_file(last_folder, MAX_PATH))
+ {
+ last_folder[0] = '/';
+ last_folder[1] = '\0';
+ }
break;
#ifdef HAVE_TAGCACHE
case GO_TO_DBBROWSER: