summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-09-26 10:56:00 +0200
committerStefano Karapetsas <[email protected]>2013-09-26 10:56:00 +0200
commitc76e1bcf5a594ca507e90d9de7dd2e635c9e5be2 (patch)
tree1b56de6cf81b2b57968e5d6b7e66671bd833bf40
parent2a9f54fac37b45c4a0e0e0b76127d3d93087f454 (diff)
downloadmate-settings-daemon-c76e1bcf5a594ca507e90d9de7dd2e635c9e5be2.tar.bz2
mate-settings-daemon-c76e1bcf5a594ca507e90d9de7dd2e635c9e5be2.tar.xz
housekeeping: Support new thumbnails path for newer glib versions
Closes #51 https://github.com/mate-desktop/mate-settings-daemon/issues/51
-rw-r--r--plugins/housekeeping/msd-housekeeping-manager.c15
1 files changed, 15 insertions, 0 deletions
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);