summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-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",