X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=src%2Ffcdir.c;h=08334ab2785fddff2820a184406c6b731c6c99c6;hb=c8d5753c0fca4e4b2ab01d49b9a0b464b9b54cb4;hp=42aaf74ea6ed333ff84fab8615935e5b2b0369a0;hpb=d2b5cc7e12cb3941080c8db07ba53ce975a914b2;p=fontconfig.git diff --git a/src/fcdir.c b/src/fcdir.c index 42aaf74..08334ab 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -117,8 +117,6 @@ FcFileScan (FcFontSet *set, { isDir = FcTrue; ret = FcStrSetAdd (dirs, file); - if (cache && ret) - FcGlobalCacheUpdate (cache, file, 0, FC_FONT_FILE_DIR); } /* * Update the cache @@ -154,6 +152,11 @@ FcFileScan (FcFontSet *set, #define FC_MAX_FILE_LEN 4096 +/* + * Scan 'dir', adding font files to 'set' and + * subdirectories to 'dirs' + */ + FcBool FcDirScan (FcFontSet *set, FcStrSet *dirs, @@ -212,6 +215,10 @@ FcDirScan (FcFontSet *set, } free (file); closedir (d); + /* + * Now that the directory has been scanned, + * add the cache entry + */ if (ret && cache) FcGlobalCacheUpdate (cache, dir, 0, 0);