Update .uuid only when -r is given but not -f.

This commit is contained in:
Akira TAGOH 2017-12-18 12:09:14 +09:00
parent dd1a92911b
commit dd21876e64
4 changed files with 9 additions and 6 deletions

View File

@ -188,7 +188,10 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
was_processed = FcTrue;
if (really_force)
{
FcDirCacheUnlink (dir, config);
FcDirCacheCreateUUID ((FcChar8 *) dir, FcTrue, config);
}
cache = NULL;
was_valid = FcFalse;

View File

@ -371,6 +371,11 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose);
FcPublic void
FcCacheCreateTagFile (const FcConfig *config);
FcPublic FcBool
FcDirCacheCreateUUID (FcChar8 *dir,
FcBool force,
FcConfig *config);
/* fccfg.c */
FcPublic FcChar8 *
FcConfigHome (void);

View File

@ -409,7 +409,7 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config)
{
FcCache *cache = NULL;
FcDirCacheCreateUUID ((FcChar8 *) dir, force, config);
FcDirCacheCreateUUID ((FcChar8 *) dir, FcFalse, config);
/* Try to use existing cache file */
if (!force)
cache = FcDirCacheLoad (dir, config, NULL);

View File

@ -596,11 +596,6 @@ struct _FcValuePromotionBuffer {
/* fccache.c */
FcPrivate FcBool
FcDirCacheCreateUUID (FcChar8 *dir,
FcBool force,
FcConfig *config);
FcPrivate FcCache *
FcDirCacheScan (const FcChar8 *dir, FcConfig *config);