From 1178b569764caaf51d2dc55f1c2cf969a98cf61e Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Thu, 13 Oct 2005 12:32:14 +0000 Subject: [PATCH] Fix flipped return value on unlink. (Reported by Mike Fabian) --- ChangeLog | 14 ++++++++++++++ src/fccache.c | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef860a8..2ccc120 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-10-13 Patrick Lam + * src/fccache.c (FcDirCacheUnlink): + + Fix flipped return value on unlink. (Reported by Mike Fabian) + +2005-10-12 Patrick Lam + + * src/fccache.c: + * src/fcdir.c (FcDirScanConfig): + * src/fcint.h: + + When fc-cache is run without --force, use directory cache files + to speed up fc-cache run time. (Reported by Mike Fabian) + 2005-10-06 Patrick Lam * src/fcname.c (FcObjectToPtr): diff --git a/src/fccache.c b/src/fccache.c index 8629385..7ccb529 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -574,11 +574,13 @@ FcDirCacheUnlink (const FcChar8 *dir) { FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE); - if (!unlink ((char *)cache_file)) + if (unlink ((char *)cache_file) != 0) + { + FcStrFree (cache_file); return FcFalse; + } FcStrFree (cache_file); - return FcTrue; } -- 2.39.5