Only add basename to patterns' FC_FILE element, not any part of the

dirname.
This commit is contained in:
Patrick Lam 2005-10-25 22:29:13 +00:00
parent 573da72910
commit 961d9b9993
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-10-25 Patrick Lam <plam@mit.edu>
* src/fcfreetype.c (FcFreeTypeQuery):
Only add basename to patterns' FC_FILE element, not any part of
the dirname.
2005-10-22 Patrick Lam <plam@mit.edu>
* src/fcfreetype.c:

View File

@ -47,6 +47,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libgen.h>
#include "fcint.h"
#include <ft2build.h>
#include FT_FREETYPE_H
@ -1287,7 +1288,7 @@ FcFreeTypeQuery (const FcChar8 *file,
printf ("Saving unique fullname %s\n", full);
}
if (!FcPatternAddString (pat, FC_FILE, file))
if (!FcPatternAddString (pat, FC_FILE, (FcChar8 *)basename((char *)file)))
goto bail1;
if (!FcPatternAddInteger (pat, FC_INDEX, id))