]> git.wh0rd.org Git - fontconfig.git/commitdiff
Improve error message when fc-cache can't write the cache. Add missing
authorPatrick Lam <plam@MIT.EDU>
Mon, 12 Dec 2005 13:46:45 +0000 (13:46 +0000)
committerPatrick Lam <plam@MIT.EDU>
Mon, 12 Dec 2005 13:46:45 +0000 (13:46 +0000)
    slash. Reported by Behdad. Incorporate Behdad's patch to create
    /var/cache/fontconfig when appropriate.

ChangeLog
fc-cache/Makefile.am
fc-cache/fc-cache.c
src/fccache.c

index 423528b87dccff4c4114b91733d58a8201da8ad4..f7a0949e8252a89dda56076b5ada1fbd5279fcf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-12-12  Patrick Lam  <plam@mit.edu>
+       * fc-cache/fc-cache.c (scanDirs):
+       * fc-cache/Makefile.am:
+       * src/fccache.c (FcDirCacheHashName):
+
+       Improve error message when fc-cache can't write the cache.  Add
+       missing slash.  Reported by Behdad.  Incorporate Behdad's patch to
+       create /var/cache/fontconfig when appropriate.
+
 2005-12-12  Behdad Esfahbod  <behdad@cs.toronto.edu>
        reviewed by: plam
        
index 5f179f5598a14f13e0fa21dccc813351e8454e7d..fb9a8c9f3bf8e27d443e2d0c22d55f9c4d2b8da8 100644 (file)
@@ -29,6 +29,11 @@ SGML = ${FC_CACHE_SRC}/fc-cache.sgml
 
 AM_CPPFLAGS = -DPKGCACHEDIR='"${pkgcachedir}"'
 
+pkgcache_DATA=stamp
+
+stamp:
+       touch $@
+
 INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS)
 
 bin_PROGRAMS=fc-cache
index 388baa7651d3386cabf8887eeed3a2168e787952..7acaafe4a9acdc727836300c573c153d4e6ee8b7 100644 (file)
@@ -209,7 +209,9 @@ scanDirs (FcStrList *list, FcConfig *config, char *program, FcBool force, FcBool
 
            if (!FcDirSave (set, subdirs, dir))
            {
-               fprintf (stderr, "Can't save cache in \"%s\"\n", dir);
+                if (!ret)
+                    fprintf (stderr, "Caches are currently saved to \"%s\"\n", PKGCACHEDIR);
+               fprintf (stderr, "Can't save cache for \"%s\"\n", dir);
                ret++;
            }
        }
index 45413e0b238c039642877d20b297e17aad9887a0..5643d3aa6694c9a97a0283d48db4c8cdb9c3f36f 100644 (file)
@@ -824,7 +824,7 @@ FcDirCacheHashName (char * cache_file, int collisions)
     if (!tmp)
        return 0;
 
-    cache_hashed = (char *)FcStrPlus ((FcChar8 *)PKGCACHEDIR, tmp);
+    cache_hashed = (char *)FcStrPlus ((FcChar8 *)PKGCACHEDIR"/", tmp);
     free (tmp);
 
     return cache_hashed;