summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2008-04-05 10:13:36 +0000
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-04-05 10:13:36 +0000
commit295bf4eeffcccc520f7c7f819b73d1c226530c1f (patch)
treee57202743d521a1d1965450b3b6cef43823ea454
parent82b55c7acf7911f74cc384af59c51c7fea7a733d (diff)
downloadnautilus-295bf4eeffcccc520f7c7f819b73d1c226530c1f.tar.gz
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=/branches/gnome-2-22/; revision=14043
-rw-r--r--ChangeLog9
-rw-r--r--libnautilus-private/nautilus-autorun.c10
-rw-r--r--src/nautilus-autorun-software.c9
3 files changed, 27 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e7043928..fb878feb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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 Christian Neumair <cneumair@gnome.org>
* src/nautilus-places-sidebar.c (nautilus_places_sidebar_init),
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index 33b43c336..e17e72ff1 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -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 */
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index cec2028e6..63616e3a9 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -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;