nautilus r14042 - in trunk: . libnautilus-private src



Author: cosimoc
Date: Sat Apr  5 11:12:18 2008
New Revision: 14042
URL: http://svn.gnome.org/viewvc/nautilus?rev=14042&view=rev

Log:
2008-04-05  Cosimo Cecchi  <cosimoc gnome org>

	* libnautilus-private/nautilus-autorun.c:
	(_g_mount_guess_content_type):
	Disable autorun when detecting autorun.exe and autorun.inf,
	as we do not support those yet (part of bug #524270).
	* src/nautilus-autorun-software.c: (autorun), (main):
	Plug some minor leaks.


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

Modified: trunk/libnautilus-private/nautilus-autorun.c
==============================================================================
--- trunk/libnautilus-private/nautilus-autorun.c	(original)
+++ trunk/libnautilus-private/nautilus-autorun.c	Sat Apr  5 11:12:18 2008
@@ -574,6 +574,7 @@
 	return _check_file_common (file, must_be_executable);
 }
 
+#ifdef NAUTILUS_AUTORUN_SUPPORTS_AUTORUN_EXE
 static gboolean
 _check_file_case_insensitive (GFile *mount_root, const char *file_path,
                               gboolean must_be_executable)
@@ -582,6 +583,7 @@
 	GFile *file = nautilus_find_file_insensitive (mount_root, file_path);
 	return _check_file_common (file, must_be_executable);
 }
+#endif
 
 /**
  * _g_mount_guess_content_type:
@@ -733,8 +735,14 @@
 	    (_check_file (root, ".autorun", TRUE) ||
 	     _check_file (root, "autorun", TRUE) ||
 	     _check_file (root, "autorun.sh", TRUE) ||
+#ifdef NAUTILUS_AUTORUN_SUPPORTS_AUTORUN_EXE
+	     /* TODO */
 	     _check_file_case_insensitive (root, "autorun.exe", TRUE) ||
-	     _check_file_case_insensitive (root, "autorun.inf", FALSE))) {
+	     _check_file_case_insensitive (root, "autorun.inf", FALSE)))
+#else
+	    0))
+#endif
+	{
 		/* 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 */

Modified: trunk/src/nautilus-autorun-software.c
==============================================================================
--- trunk/src/nautilus-autorun-software.c	(original)
+++ trunk/src/nautilus-autorun-software.c	Sat Apr  5 11:12:18 2008
@@ -153,6 +153,9 @@
         if (program_to_spawn != NULL) {
                 g_object_unref (program_to_spawn);
 	}
+	if (root != NULL) {
+		g_object_unref (root);
+	}
         g_free (path_to_spawn);
         g_free (cwd_for_program);
 
@@ -266,15 +269,21 @@
 
         file = g_file_new_for_commandline_arg (argv[1]);
         if (file == NULL) {
+		g_object_unref (monitor);
                 goto out;
 	}
 
         mount = g_file_find_enclosing_mount (file, NULL, NULL);
         if (mount == NULL) {
+		g_object_unref (file);
+		g_object_unref (monitor);
                 goto out;
 	}
 
         present_autorun_for_software_dialog (mount);
+	g_object_unref (file);
+	g_object_unref (monitor);
+	g_object_unref (mount);
 
 out:	
 	return 0;



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