ret++;
continue;
}
- if (!force && FcDirCacheValid (dir))
+ if (!force && FcDirCacheValid (dir) && FcDirCacheHasCurrentArch (dir))
{
if (verbose)
printf ("skipping, %d fonts, %d dirs\n",
printf ("caching, %d fonts, %d dirs\n",
set->nfont, nsubdirs (subdirs));
- if (!FcDirSave (set, dir))
+ if (!FcDirCacheValid (dir))
+ if (!FcDirCacheUnlink (dir))
+ ret++;
+
+ 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++;
}
}
if (systemOnly)
FcConfigEnableHome (FcFalse);
- /* need to use FcInitLoadConfig when we use dirs */
config = FcInitLoadConfig ();
if (!config)
{