fontconfig/bnc438855-make-FcInitReinitialize-work-again.patch

21 lines
715 B
Diff

diff -rup fontconfig-2.6.0.orig//src/fccache.c fontconfig-2.6.0/src/fccache.c
--- fontconfig-2.6.0.orig//src/fccache.c 2007-11-14 01:36:41.000000000 +0100
+++ fontconfig-2.6.0/src/fccache.c 2008-11-07 17:08:46.000000000 +0100
@@ -254,6 +254,7 @@ FcDirCacheProcess (FcConfig *config, con
break;
fd = FcDirCacheOpenFile (cache_hashed, &file_stat);
if (fd >= 0) {
+ if (dir_stat.st_mtime <= file_stat.st_mtime) {
ret = (*callback) (fd, &file_stat, &dir_stat, closure);
close (fd);
if (ret)
@@ -264,6 +265,8 @@ FcDirCacheProcess (FcConfig *config, con
FcStrFree (cache_hashed);
break;
}
+ } else
+ close (fd);
}
FcStrFree (cache_hashed);
}