]> git.wh0rd.org Git - fontconfig.git/commitdiff
Don't stop scanning if a directory in fonts.conf doesn't exist, because
authorPatrick Lam <plam@MIT.EDU>
Tue, 31 Jan 2006 04:07:45 +0000 (04:07 +0000)
committerPatrick Lam <plam@MIT.EDU>
Tue, 31 Jan 2006 04:07:45 +0000 (04:07 +0000)
    subsequent directories might exist.
reviewed by: plam

ChangeLog
fc-cache/fc-cache.c

index be57882e17ed103c5832488edd9fcd0eb808e99f..eebf3c0605ad3872bf8f8e749d18860bf840c601 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-30  Mike Fabian  <mfabian@suse.de>
+       reviewed by: plam
+       
+       * fc-cache/fc-cache.c (scanDirs):
+
+       Don't stop scanning if a directory in fonts.conf doesn't
+       exist, because subsequent directories might exist.
+       
 2006-01-30  Patrick Lam  <plam@mit.edu>
        * src/fccache.c (FcGlobalCacheLoad):
 
index 2d6c2c3140d9eceb9ea11a841385dc712b902f0c..f93a0856e6d7d6335cec52b22364440c946a620a 100644 (file)
@@ -113,6 +113,7 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
 {
     int                ret = 0;
     const FcChar8 *dir;
+    const FcChar8 *dir_orig;
     FcFontSet  *set;
     FcStrSet   *subdirs;
     FcStrList  *sublist;
@@ -122,17 +123,24 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
      * Now scan all of the directories into separate databases
      * and write out the results
      */
-    while ((dir = FcStrListNext (list)))
+    while ((dir_orig = FcStrListNext (list)))
     {
-       dir = FcConfigNormalizeFontDir (config, dir);
-       if (!dir)
-           return FcFalse;
-
+       dir = FcConfigNormalizeFontDir (config, dir_orig);
+       
        if (verbose)
        {
-           printf ("%s: \"%s\": ", program, dir);
+           printf ("%s: \"%s\": ", program, dir ? dir : dir_orig);
            fflush (stdout);
        }
+       
+       if (!dir)
+       {
+           if (verbose)
+               printf ("skipping, no such directory\n");
+           continue;
+       }
+       
+
        set = FcFontSetCreate ();
        if (!set)
        {