]> git.wh0rd.org Git - fontconfig.git/commitdiff
Forcibly rescan a directory before writing a fresh local cache file for
authorPatrick Lam <plam@MIT.EDU>
Wed, 2 Nov 2005 07:01:25 +0000 (07:01 +0000)
committerPatrick Lam <plam@MIT.EDU>
Wed, 2 Nov 2005 07:01:25 +0000 (07:01 +0000)
    that directory, fixing the losing-fonts problem reported by Mike Fabian
    and also apparently the font cache file corruption.

ChangeLog
fc-cache/fc-cache.c

index fdd56eeb14456d942fbd3bff1986aaa8ba07a153..7f1845f57feee398eb64f12ac68434f95684db14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
 
index 388baa7651d3386cabf8887eeed3a2168e787952..3a4b78638f9691abafedd10552208ff13f0d9453 100644 (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);