From 087bf32df3aff81a81a94153f09280706a7e732c Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Fri, 4 Apr 2008 07:37:34 +0000 Subject: [PATCH] Don't list the user directory as a mount, fix potential issue when other 2008-04-04 Sebastien Bacher * gunixmounts.c: (g_unix_mount_guess_should_display): Don't list the user directory as a mount, fix potential issue when other users have a similar naming and don't special case the gvfs mounts there since that's not required (#525866) svn path=/trunk/; revision=6825 --- gio/ChangeLog | 7 +++++++ gio/gunixmounts.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index a25e61af4..1d96b58dc 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,10 @@ +2008-04-04 Sebastien Bacher + + * gunixmounts.c: (g_unix_mount_guess_should_display): + Don't list the user directory as a mount, fix potential issue + when other users have a similar naming and don't special case the + gvfs mounts there since that's not required (#525866) + 2008-03-31 Alexander Larsson * glocalfile.c (get_parent): diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index eadbf0941..577338c8a 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -1887,13 +1887,10 @@ g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry) mount_path = mount_entry->mount_path; if (mount_path != NULL) { - if (strstr (mount_path, "/.gvfs") != NULL) - return TRUE; - if (g_str_has_prefix (mount_path, "/media/")) return TRUE; - if (g_str_has_prefix (mount_path, g_get_home_dir ())) + if (g_str_has_prefix (mount_path, g_get_home_dir ()) && mount_path[strlen (g_get_home_dir())] == G_DIR_SEPARATOR) return TRUE; }