projects
/
platform
/
upstream
/
fontconfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9feb58
)
[fccache] Make sure the cache is current when reusing from open caches
author
Behdad Esfahbod
<behdad@behdad.org>
Wed, 4 Feb 2009 02:06:15 +0000
(21:06 -0500)
committer
Behdad Esfahbod
<behdad@behdad.org>
Sun, 15 Feb 2009 21:40:25 +0000
(13:40 -0800)
Reported by Diego Santa Cruz.
src/fccache.c
patch
|
blob
|
history
diff --git
a/src/fccache.c
b/src/fccache.c
index
53df860
..
f35304a
100644
(file)
--- a/
src/fccache.c
+++ b/
src/fccache.c
@@
-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.