From fae5b82d604779dd25ea8f1dcaa5a543eff86531 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 15 Aug 2002 11:26:12 +0000 Subject: Now doesn't truncate the lenght when comparing path components git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1757 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'firmware') diff --git a/firmware/common/dir.c b/firmware/common/dir.c index 809e1a28e5..70aa4946dc 100644 --- a/firmware/common/dir.c +++ b/firmware/common/dir.c @@ -66,7 +66,6 @@ DIR* opendir(char* name) for ( part = strtok_r(namecopy, "/", &end); part; part = strtok_r(NULL, "/", &end)) { - int partlen = strlen(part); /* scan dir for name */ while (1) { if ((fat_getnext(&(opendirs[dd].fatdir),&entry) < 0) || @@ -75,7 +74,7 @@ DIR* opendir(char* name) return NULL; } if ( (entry.attr & FAT_ATTR_DIRECTORY) && - (!strncasecmp(part, entry.name, partlen)) ) { + (!strcasecmp(part, entry.name)) ) { if ( fat_opendir(&(opendirs[dd].fatdir), entry.firstcluster) < 0 ) { DEBUGF("Failed opening dir '%s' (%d)\n", -- cgit v1.2.3