[glib/glib-2-54] gio: Fix querying of thumbnail attributes other than thumbnail::path
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-54] gio: Fix querying of thumbnail attributes other than thumbnail::path
- Date: Thu, 7 Dec 2017 13:05:32 +0000 (UTC)
commit 2c066d5d3904532596a7970ced5490819f201af9
Author: Philip Withnall <withnall endlessm com>
Date: Thu Dec 7 10:21:35 2017 +0000
gio: Fix querying of thumbnail attributes other than thumbnail::path
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 <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=791325
gio/glocalfileinfo.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 1c97eef..f46d4d6 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1975,7 +1975,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]