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:
parent
b21bea3731
commit
1bcf4ae5f2
|
@ -902,6 +902,9 @@ FcStrCanonAbsoluteFilename (const FcChar8 *s)
|
||||||
if (slash)
|
if (slash)
|
||||||
{
|
{
|
||||||
switch (s - slash) {
|
switch (s - slash) {
|
||||||
|
case 1:
|
||||||
|
f -= 1; /* squash // and trim final / from file */
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!strncmp ((char *) slash, "/.", 2))
|
if (!strncmp ((char *) slash, "/.", 2))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue