+2006-02-06 Takashi Iwai <tiwai@suse.de>
+ reviewed by: plam
+ * src/fcdir.c (FcFileScanConfig):
+
+ Hoist FcFileIsDir check out of FcFileScanConfig loop.
+
2006-02-06 Takashi Iwai <tiwai@suse.de>
reviewed by: plam
int id;
FcPattern *font;
FcBool ret = FcTrue;
- FcBool isDir;
int count = 0;
if (config && !FcConfigAcceptFilename (config, file))
return FcTrue;
+ if (FcFileIsDir (file))
+ return FcStrSetAdd (dirs, file);
+
if (force)
cache = 0;
+
id = 0;
do
{
font = FcFreeTypeQuery (file, id, blanks, &count);
if (FcDebug () & FC_DBG_SCAN)
printf ("done\n");
- isDir = FcFalse;
- if (!font && FcFileIsDir (file))
- {
- isDir = FcTrue;
- ret = FcStrSetAdd (dirs, file);
- }
/*
* Add the font
*/