From: Keith Packard Date: Fri, 26 Oct 2007 04:23:36 +0000 (-0700) Subject: Also check configDirs mtimes in FcConfigUptoDate X-Git-Tag: 2.4.92~40 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ad27687f725faf7df83b161c77e99bc7bedf5b3d;p=fontconfig.git 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. --- 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;