Forcibly rescan a directory before writing a fresh local cache file for

that directory, fixing the losing-fonts problem reported by Mike Fabian
    and also apparently the font cache file corruption.
This commit is contained in:
Patrick Lam 2005-11-02 07:01:25 +00:00
parent 9090cb9ece
commit c6b75577f3
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2005-11-02 Patrick Lam <plam@mit.edu>
* fc-cache/fc-cache.c (scanDirs):
Forcibly rescan a directory before writing a fresh local
cache file for that directory, fixing the losing-fonts
problem reported by Mike Fabian and also apparently the
font cache file corruption.
2005-11-02 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcGlobalCacheLoad):

View File

@ -207,6 +207,15 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
if (!FcDirCacheUnlink (dir))
ret++;
if (!FcDirScan (set, subdirs, 0, FcConfigGetBlanks (config), dir, FcTrue))
{
fprintf (stderr, "\"%s\": error scanning\n", dir);
FcFontSetDestroy (set);
FcStrSetDestroy (subdirs);
ret++;
continue;
}
if (!FcDirSave (set, subdirs, dir))
{
fprintf (stderr, "Can't save cache in \"%s\"\n", dir);