mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 04:36:17 +01:00
glocalfileinfo: Mark the lost+found dir as hidden again
The lost+found dir isn't detected as hidden currently. This is regression
caused by the commit 728ad64b
. Let's change the code a bit to be sure that
the lost+found dir is marked as hidden again.
This commit is contained in:
parent
e75ba524fd
commit
43066d6960
@ -1929,7 +1929,7 @@ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_OS_UNIX
|
#ifndef G_OS_WIN32
|
||||||
gboolean
|
gboolean
|
||||||
_g_local_file_is_lost_found_dir (const char *path, dev_t path_dev)
|
_g_local_file_is_lost_found_dir (const char *path, dev_t path_dev)
|
||||||
{
|
{
|
||||||
|
@ -2034,11 +2034,6 @@ _g_local_file_info_get (const char *basename,
|
|||||||
if (stat_ok)
|
if (stat_ok)
|
||||||
set_info_from_stat (info, &statbuf, attribute_matcher);
|
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
|
#ifndef G_OS_WIN32
|
||||||
if (_g_file_attribute_matcher_matches_id (attribute_matcher,
|
if (_g_file_attribute_matcher_matches_id (attribute_matcher,
|
||||||
G_FILE_ATTRIBUTE_ID_STANDARD_IS_HIDDEN))
|
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,
|
g_file_info_set_is_hidden (info,
|
||||||
(basename != NULL &&
|
(basename != NULL &&
|
||||||
(basename[0] == '.' ||
|
(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))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (basename != NULL && basename[strlen (basename) -1] == '~' &&
|
if (basename != NULL && basename[strlen (basename) -1] == '~' &&
|
||||||
|
Loading…
Reference in New Issue
Block a user