From 649cc3616d11add9d5c39563f9f343614c2bb2eb Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Thu, 29 Sep 2005 05:14:04 +0000 Subject: [PATCH] Fix multi-arch cache files: compute the position for the block to be added using info from OrigFile, not NewFile. --- ChangeLog | 6 ++++++ src/fccache.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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; -- 2.39.5