Commit 31ac05e1 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair
Browse files

Do not automount mount points inside hidden hierarchies (#524075).

2008-03-31  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-autorun.c
	(should_skip_native_mount_root), (should_autorun_mount):
	Do not automount mount points inside hidden hierarchies (#524075).

svn path=/trunk/; revision=14013
parent 5058f4e6
2008-03-31 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-autorun.c
(should_skip_native_mount_root), (should_autorun_mount):
Do not automount mount points inside hidden hierarchies (#524075).
2008-03-31 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-container.c
......
......@@ -1395,6 +1395,20 @@ nautilus_inhibit_autorun_for_volume (GVolume *volume)
g_object_unref);
}
static gboolean
should_skip_native_mount_root (GFile *root)
{
char *path;
gboolean should_skip;
/* skip any mounts in hidden directory hierarchies */
path = g_file_get_path (root);
should_skip = strstr (path, "/.") != NULL;
g_free (path);
return should_skip;
}
static gboolean
should_autorun_mount (GMount *mount)
{
......@@ -1435,7 +1449,7 @@ should_autorun_mount (GMount *mount)
/* only do autorun on local files or files where g_volume_should_automount() returns TRUE */
ignore_autorun = TRUE;
if (g_file_is_native (root) ||
if ((g_file_is_native (root) && !should_skip_native_mount_root (root)) ||
(enclosing_volume != NULL && g_volume_should_automount (enclosing_volume))) {
ignore_autorun = FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment