From 3616cbe251e47cf36018a7277d9ff78f1cb0965e Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Tue, 31 Jan 2006 04:42:20 +0000 Subject: [PATCH] Actually use the directories that I added to the global cache. Fixes 'make check'. --- ChangeLog | 6 ++++++ src/fccache.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index eebf3c0..646843c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-30 Patrick Lam + * src/fccache.c (FcGlobalCacheReadDir): + + Actually use the directories that I added to the global cache. + Fixes 'make check'. + 2006-01-30 Mike Fabian reviewed by: plam diff --git a/src/fccache.c b/src/fccache.c index d6cd840..4b3adff 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -313,8 +313,9 @@ FcGlobalCacheLoad (FcGlobalCache *cache, FcBool FcGlobalCacheReadDir (FcFontSet *set, FcStrSet *dirs, FcGlobalCache * cache, const char *dir, FcConfig *config) { - FcGlobalCacheDir *d; - FcBool ret = FcFalse; + FcGlobalCacheDir *d; + FcBool ret = FcFalse; + int i; if (cache->fd == -1) return FcFalse; @@ -329,8 +330,14 @@ FcGlobalCacheReadDir (FcFontSet *set, FcStrSet *dirs, FcGlobalCache * cache, con lseek (cache->fd, d->offset, SEEK_SET); if (!FcDirCacheConsume (cache->fd, d->name, set, config)) return FcFalse; + if (strcmp (d->name, dir) == 0) + { + for (i = 0; i < d->subdirs->num; i++) + FcStrSetAdd (dirs, (FcChar8 *)d->subdirs->strs[i]); + ret = FcTrue; + } } } -- 2.39.5