Added proper comment
[modest] / src / modest-tny-account-store.c
index 7a55bee..2b63752 100644 (file)
@@ -361,10 +361,28 @@ modest_tny_account_store_get_transport_accounts (TnyAccountStoreIface *iface)
 }
        
 
+/**
+ * modest_tny_account_store_get_cache_dir:
+ * @self: self a TnyAccountStoreIface instance
+ * 
+ * returns the pathname of the cache directory
+ *
+ * Returns: a newly allocated string with the value of the pathname
+ * to the cache directory or NULL if the environment variable $HOME is
+ * not set,
+ * 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;
 }