summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Walton <calvin.walton@kepstin.ca>2023-04-28 15:34:06 -0400
committerCarlos Garnacho <carlosg@gnome.org>2023-05-11 18:20:56 +0000
commit64575c0e4e127ac04fb37e5e2e775fa544865327 (patch)
tree802bdc4d59dbcaeb278f784f10d75504cfba57de
parent1feaa9284199cad7cdae73cf82d35b02e7572c7c (diff)
downloadgnome-settings-daemon-64575c0e4e127ac04fb37e5e2e775fa544865327.tar.gz
housekeeping: clean up x-large and xx-large thumbnails
Support for two new thumbnails directories named "x-large" and "xx-large" were added to the XDG thumbnail-spec in 2020 and to gnome-desktop in GNOME 40. They started to be used by nautilus in GNOME 43 to have larger/sharper thumbnails on HiDPI screens. But the housekeeper never got updated, so the thumbnail cache has unbounded growth. I realized this problem when I was trying to debug a low disk space condition, and realized that my thumbnail cache was 10GiB in size. Add the new directories. They're only added to the XDG cache path, since any application new enough to generate these thumbnail sizes would be using that path.
-rw-r--r--plugins/housekeeping/gsd-housekeeping-manager.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c
index b291667a..be2b3621 100644
--- a/plugins/housekeeping/gsd-housekeeping-manager.c
+++ b/plugins/housekeeping/gsd-housekeeping-manager.c
@@ -207,6 +207,18 @@ get_thumbnail_dirs (void)
path = g_build_filename (g_get_user_cache_dir (),
"thumbnails",
+ "x-large",
+ NULL);
+ g_ptr_array_add (array, path);
+
+ path = g_build_filename (g_get_user_cache_dir (),
+ "thumbnails",
+ "xx-large",
+ NULL);
+ g_ptr_array_add (array, path);
+
+ path = g_build_filename (g_get_user_cache_dir (),
+ "thumbnails",
"fail",
"gnome-thumbnail-factory",
NULL);