]> git.wh0rd.org - fontconfig.git/commitdiff
Don't unlink the fonts.cache-2 file even if there's no data to write; just
authorPatrick Lam <plam@MIT.EDU>
Tue, 27 Sep 2005 15:52:58 +0000 (15:52 +0000)
committerPatrick Lam <plam@MIT.EDU>
Tue, 27 Sep 2005 15:52:58 +0000 (15:52 +0000)
    write an empty cache file. (thanks Lubos Lunak)

src/fccache.c

index e344cf46a004b50eaae1898603a19dcd74454379..16ac30b74b043995b3d6113f06122f0ae5e14e95 100644 (file)
@@ -744,13 +744,6 @@ FcDirCacheWrite (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
 
     current_dir_block = FcDirCacheProduce (set, &metadata);
 
-    if (!metadata.count && !dirs->size)
-    {
-       unlink ((char *)cache_file);
-       free (cache_file);
-       return FcTrue;
-    }
-
     if (metadata.count && !current_dir_block)
        goto bail;