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:
Peter D'Hoye 2006-04-08 12:17:51 +00:00
parent 151748e86e
commit cbd21405fc

View file

@ -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",