forked from len0rd/rockbox
File rename wrongly accepted an empty target filename, corrupting the file system
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6468 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2b1e168453
commit
263068c6cd
1 changed files with 1 additions and 1 deletions
|
|
@ -355,7 +355,7 @@ static bool rename_file(void)
|
|||
int pathlen = (ptr - selected_file);
|
||||
strncpy(newname, selected_file, sizeof newname);
|
||||
if (!kbd_input(newname + pathlen, (sizeof newname)-pathlen)) {
|
||||
if (!strlen(selected_file+pathlen) ||
|
||||
if (!strlen(newname + pathlen) ||
|
||||
(rename(selected_file, newname) < 0)) {
|
||||
lcd_clear_display();
|
||||
lcd_puts(0,0,str(LANG_RENAME));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue