Be a bit more picky when deciding if mounts are internal

Complained about in bug 623780.
This commit is contained in:
Matthias Clasen 2010-07-08 15:18:05 -04:00
parent 349aab2bd4
commit 29850d03e8

View 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;