diff --git a/ChangeLog b/ChangeLog index 2f7f85d..7450b58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-29 Patrick Lam + * src/fccache.c (FcGlobalCacheSave, FcDirCacheWrite): + + Fix multi-arch cache files: compute the position for the + block to be added using info from OrigFile, not NewFile. + 2005-09-28 Patrick Lam * src/fccache.c (FcCacheMachineSignature): diff --git a/src/fccache.c b/src/fccache.c index 0dc697e..d001e2b 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -327,7 +327,7 @@ FcGlobalCacheSave (FcGlobalCache *cache, current_arch_machine_name); if (current_arch_start < 0) - current_arch_start = FcCacheNextOffset (lseek(fd, 0, SEEK_END)); + current_arch_start = FcCacheNextOffset (lseek(fd_orig, 0, SEEK_END)); if (!FcCacheCopyOld(fd, fd_orig, current_arch_start)) goto bail3; @@ -807,7 +807,7 @@ FcDirCacheWrite (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir) FcCacheSkipToArch(fd_orig, current_arch_machine_name); if (current_arch_start < 0) - current_arch_start = FcCacheNextOffset (lseek(fd, 0, SEEK_END)); + current_arch_start = FcCacheNextOffset (lseek(fd_orig, 0, SEEK_END)); if (fd_orig != -1 && !FcCacheCopyOld(fd, fd_orig, current_arch_start)) goto bail3;