aae702d
diff -up nautilus-2.22.2/libnautilus-private/nautilus-autorun.c.fix-open-folder nautilus-2.22.2/libnautilus-private/nautilus-autorun.c
aae702d
--- nautilus-2.22.2/libnautilus-private/nautilus-autorun.c.fix-open-folder	2008-04-17 22:30:04.000000000 -0400
aae702d
+++ nautilus-2.22.2/libnautilus-private/nautilus-autorun.c	2008-04-17 22:30:10.000000000 -0400
aae702d
@@ -1200,15 +1200,6 @@ typedef struct {
aae702d
 	gpointer user_data;
aae702d
 } AutorunData;
aae702d
 
aae702d
-
aae702d
-static void
aae702d
-autorun_open_folder_for_mount (AutorunData *data)
aae702d
-{
aae702d
-	if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_MEDIA_AUTOMOUNT_OPEN) && 
aae702d
-	    data->open_window_func != NULL)
aae702d
-		data->open_window_func (data->mount, data->user_data);
aae702d
-}
aae702d
-
aae702d
 static void
aae702d
 autorun_guessed_content_type_callback (GObject *source_object,
aae702d
 				       GAsyncResult *res,
aae702d
@@ -1237,13 +1228,14 @@ autorun_guessed_content_type_callback (G
aae702d
 			}
aae702d
 			g_strfreev (guessed_content_type);
aae702d
 		} else {
aae702d
-			open_folder = TRUE;
aae702d
+			if (eel_preferences_get_boolean (NAUTILUS_PREFERENCES_MEDIA_AUTOMOUNT_OPEN))
aae702d
+				open_folder = TRUE;
aae702d
 		}
aae702d
 	}
aae702d
 
aae702d
 	/* only open the folder once.. */
aae702d
-	if (open_folder) {
aae702d
-		autorun_open_folder_for_mount (data);
aae702d
+	if (open_folder && data->open_window_func != NULL) {
aae702d
+		data->open_window_func (data->mount, data->user_data);
aae702d
 	}
aae702d
 
aae702d
 	g_object_unref (data->mount);