From 50544b13c19c6a4a9fe9cf26cdd2170ddacf86d1 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Fri, 4 Nov 2005 16:48:32 +0000 Subject: [PATCH] Add test for validity of directory caches that somehow got lost (reported by make distcheck). --- ChangeLog | 6 ++++++ src/fcdir.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d067f45..2d26433 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-04 Patrick Lam + * src/fcdir.c (FcDirScanConfig): + + Add test for validity of directory caches that + somehow got lost (reported by make distcheck). + 2005-11-04 Patrick Lam * ChangeLog: * README: diff --git a/src/fcdir.c b/src/fcdir.c index 3b9d23f..5452b60 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -139,7 +139,7 @@ FcDirScanConfig (FcFontSet *set, if (cache && FcGlobalCacheReadDir (set, dirs, cache, (char *)dir, config)) return FcTrue; - if (FcDirCacheRead (set, dirs, dir)) + if (FcDirCacheValid (dir) && FcDirCacheRead (set, dirs, dir)) return FcTrue; } -- 2.39.5