Added proper return of cache dir pathname in
authorNils Faerber <nils@kernelconcepts.de>
Wed, 10 May 2006 12:07:08 +0000 (12:07 +0000)
committerNils Faerber <nils@kernelconcepts.de>
Wed, 10 May 2006 12:07:08 +0000 (12:07 +0000)
  modest_tny_account_store_get_cache_dir()

pmo-trunk-r28

src/modest-tny-account-store.c

index 7a55bee..1ee54a8 100644 (file)
@@ -361,10 +361,21 @@ modest_tny_account_store_get_transport_accounts (TnyAccountStoreIface *iface)
 }
        
 
+/*
+ * Returns gchar* to the path of the cache directory
+ * pointer has to be freed by caller
+ */
 static const gchar*
 modest_tny_account_store_get_cache_dir (TnyAccountStoreIface *self)
 {
-       return g_strdup("/home/djcb/.modest/cache/"); /* FIXME */
+gchar *cache_dir;
+
+       if (g_getenv("HOME") != NULL)
+               cache_dir = g_strconcat(g_getenv("HOME"), "/.modest/cache/");
+       else
+               cache_dir = NULL;
+
+       return cache_dir;
 }