when we want to open a file, we want the exact specified file name, not
just one that starts with our given string... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1929 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d841ca9797
commit
e666ce933a
1 changed files with 1 additions and 3 deletions
|
@ -52,7 +52,6 @@ int open(char* pathname, int flags)
|
|||
struct dirent* entry;
|
||||
int fd;
|
||||
char* name;
|
||||
int namelen;
|
||||
|
||||
/* For now, we don't support writing */
|
||||
if(flags & (O_WRONLY | O_RDWR))
|
||||
|
@ -101,9 +100,8 @@ int open(char* pathname, int flags)
|
|||
}
|
||||
|
||||
/* scan dir for name */
|
||||
namelen = strlen(name);
|
||||
while ((entry = readdir(dir))) {
|
||||
if ( !strncasecmp(name, entry->d_name, namelen) ) {
|
||||
if ( !strcasecmp(name, entry->d_name) ) {
|
||||
fat_open(entry->startcluster, &(openfiles[fd].fatfile));
|
||||
openfiles[fd].size = entry->size;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue