[gthumb] thumbnailer: give priority to the xdg directory
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] thumbnailer: give priority to the xdg directory
- Date: Sun, 3 Apr 2022 08:27:35 +0000 (UTC)
commit 5fc822ac4d595e66e448383d7059747126bda68e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Apr 3 10:26:06 2022 +0200
thumbnailer: give priority to the xdg directory
gthumb/gnome-desktop-thumbnail.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gthumb/gnome-desktop-thumbnail.c b/gthumb/gnome-desktop-thumbnail.c
index ec491d57..d0568637 100644
--- a/gthumb/gnome-desktop-thumbnail.c
+++ b/gthumb/gnome-desktop-thumbnail.c
@@ -861,12 +861,17 @@ gnome_desktop_thumbnail_factory_new (GnomeDesktopThumbnailSize size)
#else
- /* use the xdg directory only if it already exists */
+ /* use the xdg directory if it already exists or the old dir does not exists. */
char *xdg_directory = g_build_filename (g_get_user_cache_dir (), "thumbnails", NULL);
factory->priv->use_xdg_dir = g_file_test (xdg_directory, G_FILE_TEST_EXISTS);
g_free (xdg_directory);
+ if (!factory->priv->use_xdg_dir) {
+ char *old_cache_dir = g_build_filename (g_get_home_dir (), ".thumbnails", NULL);
+ factory->priv->use_xdg_dir = !g_file_test (xdg_directory, G_FILE_TEST_EXISTS);
+ }
+
#endif
return factory;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]