summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-09-02 14:54:14 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-09-02 14:54:14 -0700
commit3b8a03c09d3a45f578680b5fe80255af9761b3fa (patch)
treeb7293a176351a730da05cad43ae2392fdb3fea95
parent9b511b290548ad2920cda94507a3311efc461e8a (diff)
Allow font caches to contain newer version numbers
Use the version number inside the cache file to mark backward compatible changes while continuing to reserve the filename number for incompatible changes.
-rw-r--r--src/fccache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fccache.c b/src/fccache.c
index af2c68f..05dc7ee 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -231,7 +231,7 @@ FcDirCacheMapFd (int fd, off_t size)
allocated = FcTrue;
}
if (cache->magic != FC_CACHE_MAGIC_MMAP ||
- cache->version != FC_CACHE_CONTENT_VERSION ||
+ cache->version < FC_CACHE_CONTENT_VERSION ||
cache->size != size)
{
if (allocated)
@@ -323,7 +323,7 @@ FcDirCacheValidateHelper (int fd, off_t size, void *closure)
ret = FcFalse;
else if (c.magic != FC_CACHE_MAGIC_MMAP)
ret = FcFalse;
- else if (c.version != FC_CACHE_CONTENT_VERSION)
+ else if (c.version < FC_CACHE_CONTENT_VERSION)
ret = FcFalse;
else if (fstat (fd, &file_stat) < 0)
ret = FcFalse;