From 1a17d356f2c5d32fa0735f0dcad739b9745116b4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 18 Jun 2002 11:22:48 +0000 Subject: [PATCH] only menu and prev are treated in directories with no entries git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1064 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/tree.c b/apps/tree.c index efddf5f5e4..a8eb01eccb 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -232,6 +232,7 @@ bool dirbrowse(char *root) { char buf[255]; int i; + int button; memcpy(currdir,root,sizeof(currdir)); numentries = showdir(root, start); @@ -245,7 +246,20 @@ bool dirbrowse(char *root) lcd_update(); while(1) { - switch(button_get(true)) { + 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: i=strlen(currdir); if (i>1) {