Don't check cache file time stamps when cleaning cache dir.

Cache file mtime is meaningless now that the directory time is encoded in
the cache.
This commit is contained in:
Keith Packard 2007-11-03 21:57:51 -07:00
parent 1d93c1752f
commit 9b84ecff92
1 changed files with 1 additions and 9 deletions

View File

@ -255,7 +255,6 @@ cleanCacheDirectory (FcConfig *config, FcChar8 *dir, FcBool verbose)
FcBool ret = FcTrue; FcBool ret = FcTrue;
FcBool remove; FcBool remove;
FcCache *cache; FcCache *cache;
struct stat file_stat;
struct stat target_stat; struct stat target_stat;
dir_base = FcStrPlus (dir, (FcChar8 *) "/"); dir_base = FcStrPlus (dir, (FcChar8 *) "/");
@ -302,7 +301,7 @@ cleanCacheDirectory (FcConfig *config, FcChar8 *dir, FcBool verbose)
break; break;
} }
remove = FcFalse; remove = FcFalse;
cache = FcDirCacheLoadFile (file_name, &file_stat); cache = FcDirCacheLoadFile (file_name, NULL);
if (!cache) if (!cache)
{ {
if (verbose) if (verbose)
@ -319,13 +318,6 @@ cleanCacheDirectory (FcConfig *config, FcChar8 *dir, FcBool verbose)
dir, ent->d_name, target_dir); dir, ent->d_name, target_dir);
remove = FcTrue; remove = FcTrue;
} }
else if (target_stat.st_mtime > file_stat.st_mtime)
{
if (verbose)
printf ("%s: %s: cache outdated: %s\n",
dir, ent->d_name, target_dir);
remove = FcTrue;
}
} }
if (remove) if (remove)
{ {