summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-04-08 12:17:51 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-04-08 12:17:51 +0000
commitcbd21405fc805dc0d494336a9df3401f94640278 (patch)
tree5e74f036fa55aeef65a1abdaa41d62a834bc7bb3 /firmware
parent151748e86eb2a24f08f200eb49cdc8739c7be9c4 (diff)
downloadrockbox-cbd21405fc805dc0d494336a9df3401f94640278.tar.gz
rockbox-cbd21405fc805dc0d494336a9df3401f94640278.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/fat.c2
1 files changed, 1 insertions, 1 deletions
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",