forked from len0rd/rockbox
Don't allow renaming to ''.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3409 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d0b4e2a9bd
commit
22cbe938fe
1 changed files with 1 additions and 1 deletions
|
|
@ -710,7 +710,7 @@ static int onplay_screen(char* dir, char* file)
|
|||
int pathlen = (ptr - buf);
|
||||
strncpy(newname, buf, sizeof newname);
|
||||
if (!kbd_input(newname + pathlen, (sizeof newname)-pathlen)) {
|
||||
if (rename(buf, newname) < 0) {
|
||||
if (!strlen(buf+pathlen) || (rename(buf, newname) < 0)) {
|
||||
lcd_clear_display();
|
||||
lcd_puts(0,0,str(LANG_RENAME));
|
||||
lcd_puts(0,1,str(LANG_FAILED));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue