+2012-02-04 Eric Blake <eblake@redhat.com>
+
+ canonicalize: fix // handling
+ * lib/canonicalize.c (canonicalize_filename_mode): Don't convert
+ /// to //, since only // is special.
+
2012-02-04 Bruno Haible <bruno@clisp.org>
ioctl: Fix test failure on native Windows.
rname_limit = rname + PATH_MAX;
rname[0] = '/';
dest = rname + 1;
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/' && name[2] != '/')
*dest++ = '/';
}
if (dest > rname + 1)
while ((--dest)[-1] != '/');
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
- && *dest == '/')
+ && *dest == '/' && dest[1] != '/')
dest++;
}
else
if (buf[0] == '/')
{
dest = rname + 1; /* It's an absolute symlink */
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT
+ && buf[1] == '/' && buf[2] != '/')
*dest++ = '/';
}
else
if (dest > rname + 1)
while ((--dest)[-1] != '/');
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
- && *dest == '/')
+ && *dest == '/' && dest[1] != '/')
dest++;
}
}
if (dest > rname + 1 && dest[-1] == '/')
--dest;
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && *dest == '/')
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1
+ && *dest == '/' && dest[1] != '/')
dest++;
*dest = '\0';
if (rname_limit != dest + 1)