diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-04-08 12:17:51 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-04-08 12:17:51 +0000 |
commit | cbd21405fc805dc0d494336a9df3401f94640278 (patch) | |
tree | 5e74f036fa55aeef65a1abdaa41d62a834bc7bb3 | |
parent | 151748e86eb2a24f08f200eb49cdc8739c7be9c4 (diff) | |
download | rockbox-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
-rw-r--r-- | firmware/drivers/fat.c | 2 |
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, | |||
1281 | entries_found = 0; | 1281 | entries_found = 0; |
1282 | 1282 | ||
1283 | /* check that our intended shortname doesn't already exist */ | 1283 | /* check that our intended shortname doesn't already exist */ |
1284 | if (!strncmp(shortname, buf + i * DIR_ENTRY_SIZE, 12)) { | 1284 | if (!strncmp(shortname, buf + i * DIR_ENTRY_SIZE, 11)) { |
1285 | /* shortname exists already, make a new one */ | 1285 | /* shortname exists already, make a new one */ |
1286 | randomize_dos_name(shortname); | 1286 | randomize_dos_name(shortname); |
1287 | LDEBUGF("Duplicate shortname, changing to %s\n", | 1287 | LDEBUGF("Duplicate shortname, changing to %s\n", |