summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 7563c1ef6e..ea2ef23e71 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -646,7 +646,6 @@ static int dirbrowse(void)
646{ 646{
647 int numentries=0; 647 int numentries=0;
648 char buf[MAX_PATH]; 648 char buf[MAX_PATH];
649 int len;
650 int button; 649 int button;
651 int oldbutton; 650 int oldbutton;
652 bool reload_root = false; 651 bool reload_root = false;
@@ -857,16 +856,8 @@ static int dirbrowse(void)
857 856
858 attr = entry->attr; 857 attr = entry->attr;
859 858
860 if (currdir[1]) /* Not in / */ 859 ft_assemble_path(buf, sizeof(buf), currdir, entry->name);
861 {
862 len = snprintf(buf, sizeof buf, "%s/%s",
863 currdir, entry->name);
864 860
865 if ((unsigned) len > sizeof(buf))
866 splash(HZ, ID2P(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
867 }
868 else /* In / */
869 snprintf(buf, sizeof buf, "/%s", entry->name);
870 } 861 }
871 onplay_result = onplay(buf, attr, curr_context, hotkey); 862 onplay_result = onplay(buf, attr, curr_context, hotkey);
872 } 863 }