diff options
author | Stefano Karapetsas <[email protected]> | 2013-09-26 10:56:00 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-09-26 10:59:09 +0200 |
commit | b4d8c8eba2352420d59787076a79a138e06145d3 (patch) | |
tree | 079d8868e942cc8afd11b7cbe3e1aad20adf0a9c | |
parent | d2d3aa715c171891a1214c363048f1a1c5f967ed (diff) | |
download | mate-settings-daemon-b4d8c8eba2352420d59787076a79a138e06145d3.tar.bz2 mate-settings-daemon-b4d8c8eba2352420d59787076a79a138e06145d3.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.c | 15 |
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); |