From cbd21405fc805dc0d494336a9df3401f94640278 Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Sat, 8 Apr 2006 12:17:51 +0000 Subject: 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 --- firmware/drivers/fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 559d00b2b9..ed93f66cc9 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -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", -- cgit v1.2.3