diff options
author | Patrick Lam <plam@MIT.EDU> | 2006-02-16 07:12:04 +0000 |
---|---|---|
committer | Patrick Lam <plam@MIT.EDU> | 2006-02-16 07:12:04 +0000 |
commit | 719f4b841f9763f2e4aa10a61cb2ffd41d9e8226 (patch) | |
tree | 1ebad0e50d8cebedf32e56ab05c990929c958276 /fc-cache | |
parent | f8a17f329815cfa5416142811b96d16f2a5cca93 (diff) |
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.
Diffstat (limited to 'fc-cache')
-rw-r--r-- | fc-cache/fc-cache.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index c4cca328..fb487d52 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -172,20 +172,24 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool 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) { |