Index: libnautilus-private/nautilus-autorun.c
===================================================================
--- libnautilus-private/nautilus-autorun.c	(revision 13642)
+++ libnautilus-private/nautilus-autorun.c	(working copy)
@@ -41,6 +41,7 @@
 #include "nautilus-program-choosing.h"
 #include "nautilus-open-with-dialog.h"
 #include "nautilus-desktop-icon-file.h"
+#include "nautilus-file-utilities.h"
 
 enum
 {
@@ -536,15 +537,13 @@
 }
 
 static gboolean
-_check_file (GFile *mount_root, const char *file_path, gboolean must_be_executable)
+_check_file_common (GFile *file, gboolean must_be_executable)
 {
-	GFile *file;
 	GFileInfo *file_info;
 	gboolean ret;
 
 	ret = FALSE;
 
-	file = g_file_get_child (mount_root, file_path);
 	file_info = g_file_query_info (file,
 				       G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE,
 				       G_FILE_QUERY_INFO_NONE,
@@ -564,6 +563,24 @@
 	return ret;
 }
 
+static gboolean
+_check_file (GFile *mount_root, const char *file_path,
+             gboolean must_be_executable)
+{
+	/* Unreffed in _check_file_common() */
+	GFile *file = g_file_get_child (mount_root, file_path);
+	return _check_file_common (file, must_be_executable);
+}
+
+static gboolean
+_check_file_case_insensitive (GFile *mount_root, const char *file_path,
+                              gboolean must_be_executable)
+{
+	/* Unreffed in _check_file_common() */
+	GFile *file = nautilus_find_file_insensitive (mount_root, file_path);
+	return _check_file_common (file, must_be_executable);
+}
+
 /**
  * _g_mount_guess_content_type:
  * @mount: a #GMount.
@@ -713,8 +730,8 @@
 	if (_check_file (root, ".autorun", TRUE) ||
 	    _check_file (root, "autorun", TRUE) ||
 	    _check_file (root, "autorun.sh", TRUE) ||
-	    _check_file (root, "autorun.exe", TRUE) || _check_file (root, "AUTORUN.EXE", TRUE) ||
-	    _check_file (root, "autorun.inf", FALSE) || _check_file (root, "AUTORUN.INF", FALSE)) {
+	    _check_file_case_insensitive (root, "autorun.exe", TRUE) ||
+	    _check_file_case_insensitive (root, "autorun.inf", FALSE)) {
 		/* http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html */
 
 		/* http://bugzilla.gnome.org/show_bug.cgi?id=509823#c3 for the autorun.exe and autorun.inf stuff */
Index: libnautilus-private/nautilus-file-utilities.c
===================================================================
--- libnautilus-private/nautilus-file-utilities.c	(revision 13642)
+++ libnautilus-private/nautilus-file-utilities.c	(working copy)
@@ -51,6 +51,8 @@
 static void update_xdg_dir_cache (void);
 static void schedule_user_dirs_changed (void);
 static void desktop_dir_changed (void);
+static GFile *
+nautilus_find_file_insensitive_next (GFile *parent, const gchar *name);
 
 
 char *
@@ -844,6 +846,92 @@
 	return location;
 }
 
+/**
+ * nautilus_find_file_insensitive
+ * 
+ * Attempt to find a file case-insentively. If the path can be found, the
+ * returned file maps directly to it. Otherwise, a file using the
+ * originally-cased path is returned. This function performs might perform
+ * I/O.
+ * 
+ * Return value: a #GFile to a child specified by @name.
+ **/
+GFile *
+nautilus_find_file_insensitive (GFile *parent, const gchar *name)
+{
+	gchar **split_path;
+	gchar *component;
+	GFile *file = g_file_dup (parent);
+	gint ii;
+	
+	split_path = g_regex_split_simple (G_DIR_SEPARATOR_S, name, 0, 0);
+	
+	for (ii = 0; (component = split_path[ii]); ii++)
+	{
+		GFile *next;
+		if (!(next = nautilus_find_file_insensitive_next (file,
+		                                                  component)))
+		{
+			/* File does not exist */
+			g_object_unref (file);
+			file = NULL;
+			break;
+		}
+		g_object_unref (file);
+		file = next;
+	}
+	g_strfreev (split_path);
+	
+	if (file) return file;
+	return g_file_get_child (parent, name);
+}
+
+static GFile *
+nautilus_find_file_insensitive_next (GFile *parent, const gchar *name)
+{
+	GFileEnumerator *children;
+	GFileInfo *info;
+	gchar *filename = NULL, *case_folded_name, *name_collation_key;
+	GFile *file = NULL;
+	
+	g_return_val_if_fail (g_utf8_validate (name, -1, NULL), NULL);
+	
+	case_folded_name = g_utf8_casefold (name, -1);
+	name_collation_key = g_utf8_collate_key (case_folded_name, -1);
+	g_free (case_folded_name);
+	
+	children = g_file_enumerate_children (parent,
+	                                      G_FILE_ATTRIBUTE_STANDARD_NAME,
+	                                      0, NULL, NULL);
+	while ((info = g_file_enumerator_next_file (children, NULL, NULL)))
+	{
+		const gchar *this_name = g_file_info_get_name (info);
+		if (g_utf8_validate (this_name, -1, NULL))
+		{
+			gchar *case_folded, *key;
+			case_folded = g_utf8_casefold (this_name, -1);
+			key = g_utf8_collate_key (case_folded, -1);
+			g_free (case_folded);
+			
+			if (strcmp (key, name_collation_key) == 0)
+				filename = g_strdup (this_name);
+			g_free (key);
+			if (filename)
+				break;
+		}
+	}
+	g_file_enumerator_close (children, NULL, NULL);
+	g_free (name_collation_key);
+	
+	if (filename)
+	{
+		file = g_file_get_child (parent, filename);
+		g_free (filename);
+	}
+	
+	return file;
+}
+
 #if !defined (NAUTILUS_OMIT_SELF_CHECK)
 
 void
Index: libnautilus-private/nautilus-file-utilities.h
===================================================================
--- libnautilus-private/nautilus-file-utilities.h	(revision 13642)
+++ libnautilus-private/nautilus-file-utilities.h	(working copy)
@@ -90,4 +90,7 @@
 
 GFile *  nautilus_find_existing_uri_in_hierarchy     (GFile *location);
 
+GFile *
+nautilus_find_file_insensitive (GFile *parent, const gchar *name);
+
 #endif /* NAUTILUS_FILE_UTILITIES_H */
