diff --git a/src/fcdir.c b/src/fcdir.c index fd62a34..edfa121 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -283,7 +283,13 @@ FcDirScanConfig (FcFontSet *set, } while ((e = readdir (d))) { - if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN) + size_t length_name = strlen (e->d_name); + /* Skip temporary dpkg files */ + #define DPKG_TMP ".dpkg-tmp" + if (length_name > strlen(DPKG_TMP) && + strcmp(e->d_name + length_name - strlen(DPKG_TMP), DPKG_TMP) == 0) + continue; + if (e->d_name[0] != '.' && length_name < FC_MAX_FILE_LEN) { strcpy ((char *) base, (char *) e->d_name); if (!FcStrSetAdd (files, file)) {