For OSTree, I use Gio and also really care about performance. It's
disturbing to see open('.hidden') all over my straces and such. At
the moment I have an explicit set of things to query, as opposed to
"standard::*", since even before this that also implies an lstat() of
the parent directory.
This matches up with what we do for all the other attributes.
See https://bugzilla.gnome.org/show_bug.cgi?id=587806
https://bugzilla.gnome.org/show_bug.cgi?id=691558
#endif
#ifndef G_OS_WIN32
- if (basename != NULL &&
- (basename[0] == '.' ||
- file_is_hidden (path, basename)))
- g_file_info_set_is_hidden (info, TRUE);
+ if (_g_file_attribute_matcher_matches_id (attribute_matcher,
+ G_FILE_ATTRIBUTE_ID_STANDARD_IS_HIDDEN))
+ {
+ if (basename != NULL &&
+ (basename[0] == '.' ||
+ file_is_hidden (path, basename)))
+ g_file_info_set_is_hidden (info, TRUE);
+ }
if (basename != NULL && basename[strlen (basename) -1] == '~' &&
(stat_ok && S_ISREG (statbuf.st_mode)))