summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-08-15 11:26:12 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-08-15 11:26:12 +0000
commitfae5b82d604779dd25ea8f1dcaa5a543eff86531 (patch)
tree8d1ae52410586c2bce14ba96f63212356a2c431b
parent71a8492a690f9fe727b588ee3a009f84a7864f91 (diff)
downloadrockbox-fae5b82d604779dd25ea8f1dcaa5a543eff86531.tar.gz
rockbox-fae5b82d604779dd25ea8f1dcaa5a543eff86531.zip
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
-rw-r--r--firmware/common/dir.c3
1 files changed, 1 insertions, 2 deletions
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)
66 66
67 for ( part = strtok_r(namecopy, "/", &end); part; 67 for ( part = strtok_r(namecopy, "/", &end); part;
68 part = strtok_r(NULL, "/", &end)) { 68 part = strtok_r(NULL, "/", &end)) {
69 int partlen = strlen(part);
70 /* scan dir for name */ 69 /* scan dir for name */
71 while (1) { 70 while (1) {
72 if ((fat_getnext(&(opendirs[dd].fatdir),&entry) < 0) || 71 if ((fat_getnext(&(opendirs[dd].fatdir),&entry) < 0) ||
@@ -75,7 +74,7 @@ DIR* opendir(char* name)
75 return NULL; 74 return NULL;
76 } 75 }
77 if ( (entry.attr & FAT_ATTR_DIRECTORY) && 76 if ( (entry.attr & FAT_ATTR_DIRECTORY) &&
78 (!strncasecmp(part, entry.name, partlen)) ) { 77 (!strcasecmp(part, entry.name)) ) {
79 if ( fat_opendir(&(opendirs[dd].fatdir), 78 if ( fat_opendir(&(opendirs[dd].fatdir),
80 entry.firstcluster) < 0 ) { 79 entry.firstcluster) < 0 ) {
81 DEBUGF("Failed opening dir '%s' (%d)\n", 80 DEBUGF("Failed opening dir '%s' (%d)\n",