+2006-02-07 Patrick Lam <plam@mit.edu>
+ * src/fcdir.c (FcDirScanConfig):
+
+ Don't reject dirs that can't be normalized (fixes lilypond, and
+ is correct in the context of application font directories.)
+
+2006-02-07 Takashi Iwai <tiwai@suse.de>
+ reviewed by: plam
+
+ * src/fccache.c (FcCacheReadDirs):
+
+ Use normalized directory name exclusively in FcCacheReadDirs.
+
2006-02-07 Dirk Mueller <dmueller@suse.com>
reviewed by: plam
{
int ret = 0;
FcChar8 *dir;
- const FcChar8 *name;
FcStrSet *subdirs;
FcStrList *sublist;
struct stat statb;
/* Skip this directory if already updated
* to avoid the looped directories via symlinks
+ * Clearly a dir not in fonts.conf shouldn't be globally cached.
*/
- name = FcConfigNormalizeFontDir (config, dir);
- if (name)
- {
- if (FcStrSetMember (processed_dirs, dir))
- continue;
- FcStrSetAdd (processed_dirs, dir);
- }
+ dir = FcConfigNormalizeFontDir (config, dir);
+ if (!dir)
+ continue;
+
+ if (FcStrSetMember (processed_dirs, dir))
+ continue;
+ if (!FcStrSetAdd (processed_dirs, dir))
+ continue;
subdirs = FcStrSetCreate ();
if (!subdirs)
if (FcDirCacheValid (dir) && FcDirCacheRead (set, subdirs, dir, config))
{
/* if an old entry is found in the global cache, disable it */
- if ((d = FcGlobalCacheDirFind (cache, (const char *)name)) != NULL)
+ if ((d = FcGlobalCacheDirFind (cache, (const char *)dir)) != NULL)
{
d->state = FcGCDirDisabled;
/* save the updated config later without this entry */
DIR *d;
struct dirent *e;
FcChar8 *file;
+ const FcChar8 *d_can = 0;
FcChar8 *base;
FcBool ret = FcTrue;
FcFontSet *tmpSet;
return FcTrue;
if (config)
- dir = FcConfigNormalizeFontDir (config, dir);
-
- /* refuse to scan a directory that can't be normalized. */
- if (!dir)
- return FcFalse;
+ d_can = FcConfigNormalizeFontDir (config, dir);
+ if (d_can)
+ dir = d_can;
if (!force)
{