+2006-02-16 Patrick Lam <plam@mit.edu>
+ * src/fccache.c (FcDirCacheUnlink, FcCacheCopyOld, FcDirCacheWrite):
+
+ Don't bail if fontconfig can't remove a dir cache file.
+ Skip the ID of a cache file when copying.
+ Eliminate 'source file too small' bug in FcDirCacheWrite.
+
2006-02-13 Patrick Lam <plam@mit.edu>
* src/fcfreetype.c (FcFreeTypeQuery):
Don't crash on non-existant directories in global cache.
-2006-01-26 Patirck Lam <plam@mit.edu>
+2006-01-26 Patrick Lam <plam@mit.edu>
* src/fccache.c (FcGlobalCacheSave, FcDirCacheWrite):
* src/fccfg.c (FcConfigAddFontDirSubdirs, FcConfigNormalizeFontDir):
* src/fcdir.c (FcDirScanConfig):
case ENOTDIR:
if (verbose)
printf ("skipping, no such directory\n");
- break;
+ FcFontSetDestroy (set);
+ FcStrSetDestroy (subdirs);
+ continue;
case EACCES:
case EROFS:
- if (verbose)
- printf ("skipping, no write access\n");
+ /* That's ok, caches go to /var anyway. */
+ /* Ideally we'd do an access on the hashed_name. */
+ /* But we hid that behind an abstraction barrier. */
break;
default:
fprintf (stderr, "\"%s\": ", dir);
perror ("");
ret++;
+
+ FcFontSetDestroy (set);
+ FcStrSetDestroy (subdirs);
+ continue;
}
- FcFontSetDestroy (set);
- FcStrSetDestroy (subdirs);
- continue;
}
if (stat ((char *) dir, &statb) == -1)
{
loc = 0;
lseek (fd, 0, SEEK_SET); lseek (fd_orig, 0, SEEK_SET);
+ FcCacheSkipString (fd); FcCacheSkipString (fd_orig);
do
{
int b = 8192;
return FcFalse;
/* First remove normal cache file. */
- if (stat ((char *) cache_file, &cache_stat) == 0 &&
- unlink ((char *)cache_file) != 0)
- goto bail;
+ if (stat ((char *) cache_file, &cache_stat) == 0)
+ unlink ((char *)cache_file);
/* Next remove any applicable hashed files. */
fd = -1; collisions = 0;
if (current_arch_start < 0)
{
off_t i = lseek(fd_orig, 0, SEEK_END);
- if (i < strlen (FC_GLOBAL_MAGIC_COOKIE)+1)
- i = strlen (FC_GLOBAL_MAGIC_COOKIE)+1;
current_arch_start = FcCacheNextOffset (i);
}