From: Patrick Lam Date: Mon, 30 Jan 2006 16:31:56 +0000 (+0000) Subject: Make global cache work again after putting dir names into global cache (I X-Git-Tag: fc-2_3_94~50 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=81d97094cf2a714417a9e73bb2f0f17f51ca3d95;p=fontconfig.git Make global cache work again after putting dir names into global cache (I misplaced the recording of a file offset). --- diff --git a/ChangeLog b/ChangeLog index 5057b59..be57882 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-30 Patrick Lam + * src/fccache.c (FcGlobalCacheLoad): + + Make global cache work again after putting dir names into global + cache (I misplaced the recording of a file offset). + 2006-01-30 Patrick Lam * fc-cat/fc-cat.c (FcCacheGlobalFileReadAndPrint): diff --git a/src/fccache.c b/src/fccache.c index 3dd7eae..d6cd840 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -267,7 +267,6 @@ FcGlobalCacheLoad (FcGlobalCache *cache, d->name = (char *)FcStrCopy ((FcChar8 *)name_buf); d->ent = 0; - d->offset = lseek (cache->fd, 0, SEEK_CUR); d->subdirs = FcStrSetCreate(); do @@ -279,6 +278,7 @@ FcGlobalCacheLoad (FcGlobalCache *cache, FcStrSetAdd (d->subdirs, (FcChar8 *)subdirName); } while (1); + d->offset = lseek (cache->fd, 0, SEEK_CUR); if (read (cache->fd, &d->metadata, sizeof (FcCache)) != sizeof (FcCache)) goto bail1; targ = FcCacheNextOffset (lseek(cache->fd, 0, SEEK_CUR)) + d->metadata.count;