From f196b03e97ce6bc4dd18f8896be2fea5086c221d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 22 Jan 2024 12:42:14 +0100 Subject: Resolve warnings resulting from GLib #2907 --- fiv-collection.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fiv-collection.c b/fiv-collection.c index 13548b9..6878898 100644 --- a/fiv-collection.c +++ b/fiv-collection.c @@ -528,12 +528,16 @@ fiv_collection_file_query_info(GFile *file, const char *attributes, g_file_info_set_name(info, basename); g_free(basename); - if ((name = g_file_info_get_display_name(info))) { + if (g_file_info_has_attribute( + info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME) && + (name = g_file_info_get_display_name(info))) { gchar *prefixed = get_prefixed_name(self, name); g_file_info_set_display_name(info, prefixed); g_free(prefixed); } - if ((name = g_file_info_get_edit_name(info))) { + if (g_file_info_has_attribute( + info, G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) && + (name = g_file_info_get_edit_name(info))) { gchar *prefixed = get_prefixed_name(self, name); g_file_info_set_edit_name(info, prefixed); g_free(prefixed); -- cgit v1.2.3-70-g09d2