From ad27687f725faf7df83b161c77e99bc7bedf5b3d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 25 Oct 2007 21:23:36 -0700 Subject: [PATCH] Also check configDirs mtimes in FcConfigUptoDate Checking only config files and font directories can miss changes which affect only a configuration directory. Check those to catch any changes. --- src/fccfg.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/fccfg.c b/src/fccfg.c index 635fdea..b55770d 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -138,23 +138,10 @@ FcConfigNewestFile (FcStrSet *files) return newest; } -FcFileTime -FcConfigModifiedTime (FcConfig *config) -{ - if (!config) - { - FcFileTime v = { 0, FcFalse }; - config = FcConfigGetCurrent (); - if (!config) - return v; - } - return FcConfigNewestFile (config->configFiles); -} - FcBool FcConfigUptoDate (FcConfig *config) { - FcFileTime config_time, font_time; + FcFileTime config_time, config_dir_time, font_time; time_t now = time(0); if (!config) { @@ -163,8 +150,10 @@ FcConfigUptoDate (FcConfig *config) return FcFalse; } config_time = FcConfigNewestFile (config->configFiles); + config_dir_time = FcConfigNewestFile (config->configDirs); font_time = FcConfigNewestFile (config->fontDirs); if ((config_time.set && config_time.time - config->rescanTime > 0) || + (config_dir_time.set && (config_dir_time.time - config->rescanTime) > 0) || (font_time.set && (font_time.time - config->rescanTime) > 0)) { return FcFalse; -- 2.39.5