X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fdata%2Fgis-http.c;h=739792a57a33669f180257aaf6cab4d511b412a2;hp=144168d3e9e3d556f8a48a231c4ee2aaad979509;hb=e995e7c95773c0adfa8dfd40b9ee5d099485afd3;hpb=54ea323c961d322b75634ada70ecac9e69a7d76e diff --git a/src/data/gis-http.c b/src/data/gis-http.c index 144168d..739792a 100644 --- a/src/data/gis-http.c +++ b/src/data/gis-http.c @@ -32,6 +32,12 @@ #include "gis-http.h" +gchar *_get_cache_path(GisHttp *http, const gchar *local) +{ + return g_build_filename(g_get_user_cache_dir(), PACKAGE, + http->prefix, local, NULL); +} + /** * gis_http_new: * @prefix: The prefix in the cache to store the downloaded files. @@ -120,8 +126,7 @@ gchar *gis_http_fetch(GisHttp *http, const gchar *uri, const char *local, g_debug("GisHttp: fetch - %s... >> %s/%s mode=%d", uri, http->prefix, local, mode); - gchar *path = g_build_filename(g_get_user_cache_dir(), PACKAGE, - http->prefix, local, NULL); + gchar *path = _get_cache_path(http, local); /* Unlink the file if we're refreshing it */ if (mode == GIS_REFRESH)