From 8b1aba844732b6c5e4d5d077b05edbc9f91faf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Wed, 19 Jun 2002 20:10:58 +0000 Subject: Don't lock ourselves in on empty dirs git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1101 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index a8eb01e..e50a4ef 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -247,17 +247,6 @@ bool dirbrowse(char *root) while(1) { button = button_get(true); - if(!numentries) { - switch(button) { - case TREE_MENU: - case TREE_PREV: - /* let it go */ - break; - default: - continue; - } - } - switch(button) { case TREE_EXIT: @@ -287,6 +276,8 @@ bool dirbrowse(char *root) break; case TREE_ENTER: + if ( !numentries ) + break; if ((currdir[0]=='/') && (currdir[1]==0)) { snprintf(buf,sizeof(buf),"%s%s",currdir, dircacheptr[dircursor+start]->name); -- cgit v1.1