mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
GIO: Hide mounts having a path element starting with dot
When a mount is mounted to a directory whose path contains an element starting with dot, let's treat it as hidden, just like the usual Unix approach.
This commit is contained in:
parent
010913c8ab
commit
2bfcffde9a
@ -1944,6 +1944,10 @@ g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
|
|||||||
mount_path = mount_entry->mount_path;
|
mount_path = mount_entry->mount_path;
|
||||||
if (mount_path != NULL)
|
if (mount_path != NULL)
|
||||||
{
|
{
|
||||||
|
/* Hide mounts within a dot path, suppose it was a purpose to hide this mount */
|
||||||
|
if (g_strstr_len (mount_path, -1, "/.") != NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (g_str_has_prefix (mount_path, "/media/"))
|
if (g_str_has_prefix (mount_path, "/media/"))
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
|
Loading…
Reference in New Issue
Block a user