[1879] 008-09-28 Felix Zielcke <[email protected]>

Felix Zielcke <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1879
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1879
Author:   fzielcke
Date:     2008-09-28 14:19:00 +0000 (Sun, 28 Sep 2008)

Log Message:
-----------
008-09-28  Felix Zielcke  <[email protected]>

	fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
	Based on code from Tomas Ebenlendr <[email protected]>.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/fs/jfs.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-09-28 03:35:49 UTC (rev 1878)
+++ trunk/grub2/ChangeLog	2008-09-28 14:19:00 UTC (rev 1879)
@@ -1,3 +1,8 @@
+008-09-28  Felix Zielcke  <[email protected]>
+
+	fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
+	Based on code from Tomas Ebenlendr <[email protected]>.
+
 2008-09-28  Bean  <[email protected]>
 
 	* fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.

Modified: trunk/grub2/fs/jfs.c
===================================================================
--- trunk/grub2/fs/jfs.c	2008-09-28 03:35:49 UTC (rev 1878)
+++ trunk/grub2/fs/jfs.c	2008-09-28 14:19:00 UTC (rev 1879)
@@ -614,8 +614,8 @@
   if (grub_jfs_read_inode (data, GRUB_JFS_AGGR_INODE, &data->currinode))
     return grub_errno;
 
-  /* Skip the first slash.  */
-  if (name[0] == '/')
+  /* Skip the first slashes.  */
+  while (*name == '/')
     {
       name++;
       if (!*name)
@@ -626,10 +626,12 @@
   next = grub_strchr (name, '/');
   if (next)
     {
-      next[0] = '\0';
-      next++;
+      while (*next == '/')
+	{
+	  next[0] = '\0';
+	  next++;
+	}
     }
-  
   diro = grub_jfs_opendir (data, &data->currinode);
   if (!diro)
     return grub_errno;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.