Commit ad27687f authored by Keith Packard's avatar Keith Packard
Browse files

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.
parent 89d6119c
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment