diff options
author | Patrick Lam <plam@MIT.EDU> | 2005-11-02 07:01:25 +0000 |
---|---|---|
committer | Patrick Lam <plam@MIT.EDU> | 2005-11-02 07:01:25 +0000 |
commit | c6b75577f3bf3019399e0a439d9cccf55e53999f (patch) | |
tree | a1772d80a22c3479a950e3475dc3a8fa0a5e82f4 | |
parent | 9090cb9eceec10581c9f927b2e895189d20d1d4c (diff) |
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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | fc-cache/fc-cache.c | 9 |
2 files changed, 17 insertions, 0 deletions
@@ -1,4 +1,12 @@ 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): Fix thinko: actually, the whole global cache is stale diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index 388baa7..3a4b786 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -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); |