aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-02-24 00:53:54 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-02-24 00:54:29 +0100
commitc214e668d9029f05b5e2d8b1159bfdb3ac1f1b8b (patch)
treec75dfa29eccc7cf4b20c5d213c6ab32b451fd920
parenta5ebc697add091664a98ba1c201767abdf577c63 (diff)
downloadfiv-c214e668d9029f05b5e2d8b1159bfdb3ac1f1b8b.tar.gz
fiv-c214e668d9029f05b5e2d8b1159bfdb3ac1f1b8b.tar.xz
fiv-c214e668d9029f05b5e2d8b1159bfdb3ac1f1b8b.zip
Resolve more GLib #2907 warnings
-rw-r--r--fiv-io-model.c4
-rw-r--r--fiv-sidebar.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/fiv-io-model.c b/fiv-io-model.c
index 2ee1002..3309702 100644
--- a/fiv-io-model.c
+++ b/fiv-io-model.c
@@ -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;
diff --git a/fiv-sidebar.c b/fiv-sidebar.c
index 5c23a33..900c8a8 100644
--- a/fiv-sidebar.c
+++ b/fiv-sidebar.c
@@ -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;