+2016-01-13 Flavio Cruz <flaviocruz@gmail.com>
+
+ * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Do not remove
+ leading slash when `file_name' is "/".
+
2016-01-12 Joseph Myers <joseph@codesourcery.com>
* bits/mman-linux.h [!MCL_CURRENT] (MCL_ONFAULT): New macro.
error_t lookup_op (file_t startdir)
{
- while (file_name[0] == '/')
- file_name++;
+ if (file_name[0] == '/' && file_name[1] != '\0')
+ {
+ while (file_name[1] == '/')
+ /* Remove double leading slash. */
+ file_name++;
+ if (file_name[1] != '\0')
+ /* Remove leading slash when we have more than the slash. */
+ file_name++;
+ }
return lookup_error ((*lookup) (startdir, file_name, flags, mode,
&doretry, retryname, result));