Resolve more GLib #2907 warnings

This commit is contained in:
Přemysl Eric Janouch 2024-02-24 00:53:54 +01:00
parent a5ebc697ad
commit c214e668d9
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 7 additions and 2 deletions

View File

@ -247,7 +247,9 @@ static GPtrArray *
model_decide_placement(
FivIoModel *self, GFileInfo *info, GPtrArray *subdirs, GPtrArray *files)
{
if (self->filtering && g_file_info_get_is_hidden(info))
if (self->filtering &&
g_file_info_has_attribute(info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) &&
g_file_info_get_is_hidden(info))
return NULL;
if (g_file_info_get_file_type(info) == G_FILE_TYPE_DIRECTORY)
return subdirs;

View File

@ -433,7 +433,10 @@ complete_path(GFile *location, GtkListStore *model)
!info)
break;
if (g_file_info_get_file_type(info) != G_FILE_TYPE_DIRECTORY ||
if (g_file_info_get_file_type(info) != G_FILE_TYPE_DIRECTORY)
continue;
if (g_file_info_has_attribute(info,
G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) &&
g_file_info_get_is_hidden(info))
continue;