From 62dece198b7e1734e8455a61e4d43950d6653b33 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 7 Dec 2017 10:21:35 +0000 Subject: [PATCH] gio: Fix querying of thumbnail attributes other than thumbnail::path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The thumbnail attributes would previously only be set if thumbnail::path was included in the query — so querying for just thumbnail::is-valid would return no results. This fixes the behaviour of gio info -a thumbnail::is-valid ./some-file.png vs gio info -a thumbnail ./some-file.png The first command would previously list nothing. The second would previously list a thumbnail::path and thumbnail::is-valid. Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=791325 --- gio/glocalfileinfo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index f0c99dfa0..75169d6e6 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -1981,7 +1981,11 @@ _g_local_file_info_get (const char *basename, get_xattrs (path, FALSE, info, attribute_matcher, (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) == 0); if (_g_file_attribute_matcher_matches_id (attribute_matcher, - G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH)) + G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH) || + _g_file_attribute_matcher_matches_id (attribute_matcher, + G_FILE_ATTRIBUTE_ID_THUMBNAIL_IS_VALID) || + _g_file_attribute_matcher_matches_id (attribute_matcher, + G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED)) { if (stat_ok) get_thumbnail_attributes (path, info, &statbuf);