Comparing short filenames for uniqueness used 1 char too much, causing it to create identical short filenames. Fixes bugreport #5030.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9563 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
151748e86e
commit
cbd21405fc
1 changed files with 1 additions and 1 deletions
|
@ -1281,7 +1281,7 @@ static int add_dir_entry(struct fat_dir* dir,
|
|||
entries_found = 0;
|
||||
|
||||
/* check that our intended shortname doesn't already exist */
|
||||
if (!strncmp(shortname, buf + i * DIR_ENTRY_SIZE, 12)) {
|
||||
if (!strncmp(shortname, buf + i * DIR_ENTRY_SIZE, 11)) {
|
||||
/* shortname exists already, make a new one */
|
||||
randomize_dos_name(shortname);
|
||||
LDEBUGF("Duplicate shortname, changing to %s\n",
|
||||
|
|
Loading…
Reference in a new issue