summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/apps/tree.c b/apps/tree.c
index aedeeb1..88fb2f3 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -773,16 +773,18 @@ static bool handle_on(int *ds, int *dc, int numentries, int tree_max_on_screen,
int onplay_result;
if(!numentries)
- break;
+ onplay_result = onplay(NULL, 0);
+ else {
+ if (currdir[1])
+ snprintf(buf, sizeof buf, "%s/%s",
+ currdir, dircache[dircursor+dirstart].name);
+ else
+ snprintf(buf, sizeof buf, "/%s",
+ dircache[dircursor+dirstart].name);
+ onplay_result = onplay(buf,
+ dircache[dircursor+dirstart].attr);
+ }
- if (currdir[1])
- snprintf(buf, sizeof buf, "%s/%s",
- currdir, dircache[dircursor+dirstart].name);
- else
- snprintf(buf, sizeof buf, "/%s",
- dircache[dircursor+dirstart].name);
- onplay_result = onplay(buf,
- dircache[dircursor+dirstart].attr);
switch (onplay_result)
{
case ONPLAY_OK:
@@ -1502,30 +1504,6 @@ bool create_playlist(void)
return true;
}
-bool create_dir(void)
-{
- char dirname[MAX_PATH];
- int rc;
- int pathlen;
-
- memset(dirname, 0, sizeof dirname);
-
- snprintf(dirname, sizeof dirname, "%s/",
- currdir[1] ? currdir : "");
-
- pathlen = strlen(dirname);
- rc = kbd_input(dirname + pathlen, (sizeof dirname)-pathlen);
- if(rc < 0)
- return false;
-
- rc = mkdir(dirname, 0);
- if(rc < 0) {
- splash(HZ, true, "%s %s", str(LANG_CREATE_DIR), str(LANG_FAILED));
- }
-
- return true;
-}
-
bool rockbox_browse(char *root, int dirfilter)
{
bool rc;