Commit fbb8e2f2 authored by Cosimo Cecchi's avatar Cosimo Cecchi Committed by Cosimo Cecchi

Disable autorun when detecting autorun.exe and autorun.inf, as we do not

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.

svn path=/trunk/; revision=14042
parent d3e0837b
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.
2008-04-04 A. Walton <awalton@svn.gnome.org>
* configure.in:
......
......@@ -574,6 +574,7 @@ _check_file (GFile *mount_root, const char *file_path,
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 @@ _check_file_case_insensitive (GFile *mount_root, const char *file_path,
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 @@ _g_mount_guess_content_type (GMount *mount,
(_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 */
......
......@@ -153,6 +153,9 @@ out:
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 @@ main (int argc, char *argv[])
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;
......
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