From 0948c59128f8ca209a6991adf587493ef10805f7 Mon Sep 17 00:00:00 2001 From: fzielcke Date: Wed, 3 Jun 2009 13:49:27 +0000 Subject: [PATCH] 2009-05-28 Pavel Roskin * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not just one slash. That's how grub_fshelp_find_file() does it. git-svn-id: svn://svn.savannah.gnu.org/grub/trunk/grub2@2239 d0de0278-0dc1-4c01-8a07-af38b3205e46 --- ChangeLog | 5 +++++ fs/hfs.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 893a21c0..7a184c0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-28 Pavel Roskin + + * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not + just one slash. That's how grub_fshelp_find_file() does it. + 2009-05-26 Pavel Roskin * genmk.rb: Avoid shadowing variable `s', rename the outer `s' diff --git a/fs/hfs.c b/fs/hfs.c index 056fce1f..fe5d2694 100644 --- a/fs/hfs.c +++ b/fs/hfs.c @@ -887,7 +887,8 @@ grub_hfs_find_dir (struct grub_hfs_data *data, const char *path, return grub_errno; path = origpath; - path++; + while (*path == '/') + path++; while (path && grub_strlen (path)) { @@ -901,8 +902,8 @@ grub_hfs_find_dir (struct grub_hfs_data *data, const char *path, next = grub_strchr (path, '/'); if (next) { - next[0] = '\0'; - next++; + while (*next == '/') + *(next++) = '\0'; } struct grub_hfs_catalog_key key; -- 2.11.4.GIT