From 29850d03e8456ff7b05d7bd6fc9eba9895b50ff6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 8 Jul 2010 15:18:05 -0400 Subject: [PATCH] Be a bit more picky when deciding if mounts are internal Complained about in bug 623780. --- gio/gunixmounts.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index bca3dcaa1..cec926bff 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -242,18 +242,19 @@ g_unix_is_mount_path_system_internal (const char *mount_path) "/proc", "/sbin", "/net", + "/sys", NULL }; if (is_in (mount_path, ignore_mountpoints)) return TRUE; - if (g_str_has_prefix (mount_path, "/dev") || - g_str_has_prefix (mount_path, "/proc") || - g_str_has_prefix (mount_path, "/sys")) + if (g_str_has_prefix (mount_path, "/dev/") || + g_str_has_prefix (mount_path, "/proc/") || + g_str_has_prefix (mount_path, "/sys/")) return TRUE; - if (strstr (mount_path, "/.gvfs") != NULL) + if (g_str_has_suffix (mount_path, "/.gvfs")) return TRUE; return FALSE;