nautilus r14013 - in trunk: . libnautilus-private



Author: cneumair
Date: Mon Mar 31 17:47:44 2008
New Revision: 14013
URL: http://svn.gnome.org/viewvc/nautilus?rev=14013&view=rev

Log:
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).


Modified:
   trunk/ChangeLog
   trunk/libnautilus-private/nautilus-autorun.c

Modified: trunk/libnautilus-private/nautilus-autorun.c
==============================================================================
--- trunk/libnautilus-private/nautilus-autorun.c	(original)
+++ trunk/libnautilus-private/nautilus-autorun.c	Mon Mar 31 17:47:44 2008
@@ -1396,6 +1396,20 @@
 }
 
 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)
 {
 	GFile *root, *file;
@@ -1435,7 +1449,7 @@
 
 	/* 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;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]