Commit 3b8a03c0 authored by Keith Packard's avatar Keith Packard
Browse files

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.
parent 9b511b29
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment