summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index eebf788029..677f9302c4 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -710,7 +710,7 @@ static int onplay_screen(char* dir, char* file)
710 int pathlen = (ptr - buf); 710 int pathlen = (ptr - buf);
711 strncpy(newname, buf, sizeof newname); 711 strncpy(newname, buf, sizeof newname);
712 if (!kbd_input(newname + pathlen, (sizeof newname)-pathlen)) { 712 if (!kbd_input(newname + pathlen, (sizeof newname)-pathlen)) {
713 if (rename(buf, newname) < 0) { 713 if (!strlen(buf+pathlen) || (rename(buf, newname) < 0)) {
714 lcd_clear_display(); 714 lcd_clear_display();
715 lcd_puts(0,0,str(LANG_RENAME)); 715 lcd_puts(0,0,str(LANG_RENAME));
716 lcd_puts(0,1,str(LANG_FAILED)); 716 lcd_puts(0,1,str(LANG_FAILED));