]> git.wh0rd.org - fontconfig.git/commitdiff
Make global cache work again after putting dir names into global cache (I
authorPatrick Lam <plam@MIT.EDU>
Mon, 30 Jan 2006 16:31:56 +0000 (16:31 +0000)
committerPatrick Lam <plam@MIT.EDU>
Mon, 30 Jan 2006 16:31:56 +0000 (16:31 +0000)
    misplaced the recording of a file offset).

ChangeLog
src/fccache.c

index 5057b59c61b2f9bf61af2bd966bb247848f887c3..be57882e17ed103c5832488edd9fcd0eb808e99f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
        * fc-cat/fc-cat.c (FcCacheGlobalFileReadAndPrint):
        
index 3dd7eae3ba790c2025853a54d2cb9bd19df1eb9e..d6cd84079359abe05d48d069046b708c1bd09d59 100644 (file)
@@ -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;