]> git.wh0rd.org - fontconfig.git/blobdiff - fc-cache/fc-cache.c
Improve error message when fc-cache can't write the cache. Add missing
[fontconfig.git] / fc-cache / fc-cache.c
index 3a4b78638f9691abafedd10552208ff13f0d9453..7acaafe4a9acdc727836300c573c153d4e6ee8b7 100644 (file)
@@ -207,18 +207,11 @@ 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);
+                if (!ret)
+                    fprintf (stderr, "Caches are currently saved to \"%s\"\n", PKGCACHEDIR);
+               fprintf (stderr, "Can't save cache for \"%s\"\n", dir);
                ret++;
            }
        }