summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2023-03-06 17:47:46 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2023-03-06 17:47:46 +0000
commitff2fad77efd3a254d1b045b6e7c415c54d58ca60 (patch)
tree7522665c1b3771cc9b4cc4aaf250de8a202e205a
parentab3076a2427dbacbe40390c7d8654dc3448cbc84 (diff)
parent43066d696032a8d33994bf611a60bcfddb3b28ef (diff)
downloadglib-ff2fad77efd3a254d1b045b6e7c415c54d58ca60.tar.gz
Merge branch 'wip/oholy/lost-and-found-is-hidden' into 'main'
glocalfileinfo: Mark the lost+found dir as hidden again See merge request GNOME/glib!3310
-rw-r--r--gio/glocalfile.c2
-rw-r--r--gio/glocalfileinfo.c9
2 files changed, 4 insertions, 7 deletions
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 2b43ff47c..ca9e18366 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -1929,7 +1929,7 @@ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev)
return res;
}
-#ifdef G_OS_UNIX
+#ifndef G_OS_WIN32
gboolean
_g_local_file_is_lost_found_dir (const char *path, dev_t path_dev)
{
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 09529957f..d02606ff8 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -2034,11 +2034,6 @@ _g_local_file_info_get (const char *basename,
if (stat_ok)
set_info_from_stat (info, &statbuf, attribute_matcher);
-#ifdef G_OS_UNIX
- if (stat_ok && _g_local_file_is_lost_found_dir (path, _g_stat_dev (&statbuf)))
- g_file_info_set_is_hidden (info, TRUE);
-#endif
-
#ifndef G_OS_WIN32
if (_g_file_attribute_matcher_matches_id (attribute_matcher,
G_FILE_ATTRIBUTE_ID_STANDARD_IS_HIDDEN))
@@ -2046,7 +2041,9 @@ _g_local_file_info_get (const char *basename,
g_file_info_set_is_hidden (info,
(basename != NULL &&
(basename[0] == '.' ||
- file_is_hidden (path, basename))));
+ file_is_hidden (path, basename) ||
+ (stat_ok &&
+ _g_local_file_is_lost_found_dir (path, _g_stat_dev (&statbuf))))));
}
_g_file_info_set_attribute_boolean_by_id (info,