summaryrefslogtreecommitdiffstats
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 730c59f611..01a00d1f40 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -545,7 +545,8 @@ char* get_current_file(char* buffer, size_t buffer_len)
{
if (tc.dirlength)
{
- strlcat(buffer, "/", buffer_len);
+ if (buffer[strlen(buffer)-1] != '/')
+ strlcat(buffer, "/", buffer_len);
if (strlcat(buffer, e->name, buffer_len) >= buffer_len)
return NULL;
}