summaryrefslogtreecommitdiff
path: root/firmware/common/file_internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common/file_internal.c')
-rw-r--r--firmware/common/file_internal.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c
index 8e0df576bf..a73d9beaa2 100644
--- a/firmware/common/file_internal.c
+++ b/firmware/common/file_internal.c
@@ -433,7 +433,7 @@ static NO_INLINE int open_path_component(struct pathwalk *walkp,
433 int rc; 433 int rc;
434 434
435 /* create a null-terminated copy of the component name */ 435 /* create a null-terminated copy of the component name */
436 //char *compname = strmemdupa(compp->name, compp->length); 436 char *compname = strmemdupa(compp->name, compp->length);
437 437
438 unsigned int callflags = walkp->callflags; 438 unsigned int callflags = walkp->callflags;
439 struct pathwalk_component *parentp = compp->nextp; 439 struct pathwalk_component *parentp = compp->nextp;
@@ -455,8 +455,7 @@ static NO_INLINE int open_path_component(struct pathwalk *walkp,
455 if (rc > 1 && !(callflags & FF_NOISO)) 455 if (rc > 1 && !(callflags & FF_NOISO))
456 iso_decode_d_name(dir_fatent.name); 456 iso_decode_d_name(dir_fatent.name);
457 457
458 if (!strncasecmp(compp->name, dir_fatent.name, compp->length) && 458 if (!strcasecmp(compname, dir_fatent.name))
459 dir_fatent.name[compp->length] == '\0') /* make sure of actual match */
460 break; 459 break;
461 } 460 }
462 461
@@ -475,8 +474,8 @@ static NO_INLINE int open_path_component(struct pathwalk *walkp,
475 &compp->info.fatfile); 474 &compp->info.fatfile);
476 if (rc < 0) 475 if (rc < 0)
477 { 476 {
478 DEBUGF("I/O error opening file/directory %.*s (%d)\n", 477 DEBUGF("I/O error opening file/directory %s (%d)\n",
479 compp->length, compp->name, rc); 478 compname, rc);
480 return -EIO; 479 return -EIO;
481 } 480 }
482 481