[Fontconfig] fontconfig: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Thu Oct 25 21:23:41 PDT 2007


 src/fccfg.c |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

New commits:
commit ad27687f725faf7df83b161c77e99bc7bedf5b3d
Author: Keith Packard <keithp at koto.keithp.com>
Date:   Thu Oct 25 21:23:36 2007 -0700

    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;


More information about the Fontconfig mailing list