]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-05-28 Pavel Roskin <proski@gnu.org>
authorfzielcke <fzielcke@localhost>
Wed, 3 Jun 2009 13:49:27 +0000 (13:49 +0000)
committerfzielcke <fzielcke@localhost>
Wed, 3 Jun 2009 13:49:27 +0000 (13:49 +0000)
* fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
just one slash.  That's how grub_fshelp_find_file() does it.

ChangeLog
fs/hfs.c

index 893a21c06738f947b0cb0b2d66e8264c4b16bece..7a184c0e466516e01b2161c0eebcd579d5aceac8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-28  Pavel Roskin  <proski@gnu.org>
+
+       * 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  <proski@gnu.org>
 
        * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
index 056fce1fb246c8b412a80021d203beccf3807c3f..fe5d2694fcaa9b97b6a48172feb911c84e44a71f 100644 (file)
--- 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;