Be a bit more picky when deciding if mounts are internal
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Jul 2010 19:18:05 +0000 (15:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 8 Jul 2010 19:18:05 +0000 (15:18 -0400)
Complained about in bug 623780.

gio/gunixmounts.c

index bca3dcaa197af25240a5169cda28d8a6510b4ac6..cec926bff123a0aa1f16ad2a043f2a110f616308 100644 (file)
@@ -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;