Make global cache work again after putting dir names into global cache (I
misplaced the recording of a file offset).
This commit is contained in:
parent
2c4e012497
commit
81d97094cf
|
@ -1,3 +1,9 @@
|
||||||
|
2006-01-30 Patrick Lam <plam@mit.edu>
|
||||||
|
* 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 <plam@mit.edu>
|
2006-01-30 Patrick Lam <plam@mit.edu>
|
||||||
* fc-cat/fc-cat.c (FcCacheGlobalFileReadAndPrint):
|
* fc-cat/fc-cat.c (FcCacheGlobalFileReadAndPrint):
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,6 @@ FcGlobalCacheLoad (FcGlobalCache *cache,
|
||||||
|
|
||||||
d->name = (char *)FcStrCopy ((FcChar8 *)name_buf);
|
d->name = (char *)FcStrCopy ((FcChar8 *)name_buf);
|
||||||
d->ent = 0;
|
d->ent = 0;
|
||||||
d->offset = lseek (cache->fd, 0, SEEK_CUR);
|
|
||||||
|
|
||||||
d->subdirs = FcStrSetCreate();
|
d->subdirs = FcStrSetCreate();
|
||||||
do
|
do
|
||||||
|
@ -279,6 +278,7 @@ FcGlobalCacheLoad (FcGlobalCache *cache,
|
||||||
FcStrSetAdd (d->subdirs, (FcChar8 *)subdirName);
|
FcStrSetAdd (d->subdirs, (FcChar8 *)subdirName);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
|
d->offset = lseek (cache->fd, 0, SEEK_CUR);
|
||||||
if (read (cache->fd, &d->metadata, sizeof (FcCache)) != sizeof (FcCache))
|
if (read (cache->fd, &d->metadata, sizeof (FcCache)) != sizeof (FcCache))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
targ = FcCacheNextOffset (lseek(cache->fd, 0, SEEK_CUR)) + d->metadata.count;
|
targ = FcCacheNextOffset (lseek(cache->fd, 0, SEEK_CUR)) + d->metadata.count;
|
||||||
|
|
Loading…
Reference in New Issue