]> git.wh0rd.org - fontconfig.git/commitdiff
Fix multi-arch cache files: compute the position for the block to be added
authorPatrick Lam <plam@MIT.EDU>
Thu, 29 Sep 2005 05:14:04 +0000 (05:14 +0000)
committerPatrick Lam <plam@MIT.EDU>
Thu, 29 Sep 2005 05:14:04 +0000 (05:14 +0000)
    using info from OrigFile, not NewFile.

ChangeLog
src/fccache.c

index 2f7f85d4b228de9b29fa93181e0affa154d725e0..7450b58e9d35ad43386888916b34a5ca0c5803c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-29  Patrick Lam  <plam@mit.edu>
+       * 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  <plam@mit.edu>
        * src/fccache.c (FcCacheMachineSignature):
 
index 0dc697e8f2e9d9d86d7eda64cda4895055d56bd7..d001e2b255bec1d13a94d7336dc7ad7cd9d3f6bc 100644 (file)
@@ -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;