[fccache] Make sure the cache is current when reusing from open caches
Reported by Diego Santa Cruz.
This commit is contained in:
parent
f9feb587fa
commit
6bb5d72fe7
|
@ -538,7 +538,13 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat)
|
|||
return NULL;
|
||||
cache = FcCacheFindByStat (fd_stat);
|
||||
if (cache)
|
||||
return cache;
|
||||
{
|
||||
if (FcCacheTimeValid (cache, dir_stat))
|
||||
return cache;
|
||||
FcDirCacheUnload (cache);
|
||||
cache = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Lage cache files are mmap'ed, smaller cache files are read. This
|
||||
* balances the system cost of mmap against per-process memory usage.
|
||||
|
|
Loading…
Reference in New Issue