2008-09-05 Bean <bean123ch@gmail.com>
* fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names. * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case insensitive bit for names in Win32 and Win32 & DOS namespace. * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro. * include/grub/types.h (LONG_MAX): Likewise.
This commit is contained in:
parent
4ee5592137
commit
5926115732
5 changed files with 34 additions and 6 deletions
|
@ -80,14 +80,17 @@ grub_fshelp_find_file (const char *path, grub_fshelp_node_t rootnode,
|
|||
enum grub_fshelp_filetype filetype,
|
||||
grub_fshelp_node_t node)
|
||||
{
|
||||
if (type == GRUB_FSHELP_UNKNOWN || grub_strcmp (name, filename))
|
||||
if (filetype == GRUB_FSHELP_UNKNOWN ||
|
||||
(grub_strcmp (name, filename) &&
|
||||
(! (filetype & GRUB_FSHELP_CASE_INSENSITIVE) ||
|
||||
grub_strncasecmp (name, filename, LONG_MAX))))
|
||||
{
|
||||
grub_free (node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The node is found, stop iterating over the nodes. */
|
||||
type = filetype;
|
||||
type = filetype & ~GRUB_FSHELP_CASE_INSENSITIVE;
|
||||
oldnode = currnode;
|
||||
currnode = node;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue