008-09-28 Felix Zielcke <fzielcke@z-51.de>
fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one. Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
This commit is contained in:
parent
92274e85da
commit
eb079ba9e2
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
008-09-28 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
|
||||||
|
Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
|
||||||
|
|
||||||
2008-09-28 Bean <bean123ch@gmail.com>
|
2008-09-28 Bean <bean123ch@gmail.com>
|
||||||
|
|
||||||
* fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
|
* fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
|
||||||
|
|
8
fs/jfs.c
8
fs/jfs.c
|
@ -614,8 +614,8 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
|
||||||
if (grub_jfs_read_inode (data, GRUB_JFS_AGGR_INODE, &data->currinode))
|
if (grub_jfs_read_inode (data, GRUB_JFS_AGGR_INODE, &data->currinode))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
/* Skip the first slash. */
|
/* Skip the first slashes. */
|
||||||
if (name[0] == '/')
|
while (*name == '/')
|
||||||
{
|
{
|
||||||
name++;
|
name++;
|
||||||
if (!*name)
|
if (!*name)
|
||||||
|
@ -625,11 +625,13 @@ grub_jfs_find_file (struct grub_jfs_data *data, const char *path)
|
||||||
/* Extract the actual part from the pathname. */
|
/* Extract the actual part from the pathname. */
|
||||||
next = grub_strchr (name, '/');
|
next = grub_strchr (name, '/');
|
||||||
if (next)
|
if (next)
|
||||||
|
{
|
||||||
|
while (*next == '/')
|
||||||
{
|
{
|
||||||
next[0] = '\0';
|
next[0] = '\0';
|
||||||
next++;
|
next++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
diro = grub_jfs_opendir (data, &data->currinode);
|
diro = grub_jfs_opendir (data, &data->currinode);
|
||||||
if (!diro)
|
if (!diro)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
Loading…
Reference in a new issue