From c76e1bcf5a594ca507e90d9de7dd2e635c9e5be2 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Thu, 26 Sep 2013 10:56:00 +0200 Subject: housekeeping: Support new thumbnails path for newer glib versions Closes #51 https://github.com/mate-desktop/mate-settings-daemon/issues/51 --- plugins/housekeeping/msd-housekeeping-manager.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/housekeeping/msd-housekeeping-manager.c') diff --git a/plugins/housekeeping/msd-housekeeping-manager.c b/plugins/housekeeping/msd-housekeeping-manager.c index cbb1143..bd27898 100644 --- a/plugins/housekeeping/msd-housekeeping-manager.c +++ b/plugins/housekeeping/msd-housekeeping-manager.c @@ -203,22 +203,37 @@ purge_thumbnail_cache (MsdHousekeepingManager *manager) g_debug ("housekeeping: checking thumbnail cache size and freshness"); +#if GLIB_CHECK_VERSION (2, 34, 0) + path = g_build_filename (g_get_user_cache_dir (), + "thumbnails", +#else path = g_build_filename (g_get_home_dir (), ".thumbnails", +#endif "normal", NULL); files = read_dir_for_purge (path, NULL); g_free (path); +#if GLIB_CHECK_VERSION (2, 34, 0) + path = g_build_filename (g_get_user_cache_dir (), + "thumbnails", +#else path = g_build_filename (g_get_home_dir (), ".thumbnails", +#endif "large", NULL); files = read_dir_for_purge (path, files); g_free (path); +#if GLIB_CHECK_VERSION (2, 34, 0) + path = g_build_filename (g_get_user_cache_dir (), + "thumbnails", +#else path = g_build_filename (g_get_home_dir (), ".thumbnails", +#endif "fail", "mate-thumbnail-factory", NULL); -- cgit v1.2.1