mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gio-tool-info: Add missing attribute check
`g_file_info_get_is_hidden()` should not be called without checking the attribute is set first, just as with the calls higher up in this code. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2907
This commit is contained in:
parent
ed8e86a7d4
commit
7082f03dbf
@ -196,7 +196,8 @@ show_info (GFile *file, GFileInfo *info)
|
||||
g_print (" %"G_GUINT64_FORMAT"\n", (guint64)size);
|
||||
}
|
||||
|
||||
if (g_file_info_get_is_hidden (info))
|
||||
if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) &&
|
||||
g_file_info_get_is_hidden (info))
|
||||
g_print (_("hidden\n"));
|
||||
|
||||
uri = g_file_get_uri (file);
|
||||
|
Loading…
Reference in New Issue
Block a user