When canonizing filenames, squash // and remove final / (#bug 16286)

The fact that we now drop final slashes from all filenames without
checking that the file name represents a directory may surprise some,
but it doesn't bother me really.
This commit is contained in:
Behdad Esfahbod 2008-08-12 15:10:04 -04:00
parent b21bea3731
commit 1bcf4ae5f2
1 changed files with 3 additions and 0 deletions

View File

@ -902,6 +902,9 @@ FcStrCanonAbsoluteFilename (const FcChar8 *s)
if (slash)
{
switch (s - slash) {
case 1:
f -= 1; /* squash // and trim final / from file */
break;
case 2:
if (!strncmp ((char *) slash, "/.", 2))
{