Commit 2f7dafcf authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Only look for autorun stuff for local files. We can't generally exec stuff

2008-03-06  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-autorun.c (_g_mount_guess_content_type):
	Only look for autorun stuff for local files.
	We can't generally exec stuff for non-local files anyway,
	and is a performance hit to do the check.


svn path=/trunk/; revision=13886
parent 0a36f60b
2008-03-06 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-autorun.c (_g_mount_guess_content_type):
Only look for autorun stuff for local files.
We can't generally exec stuff for non-local files anyway,
and is a performance hit to do the check.
2008-03-05 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-autorun.[ch]:
......
......@@ -729,18 +729,18 @@ _g_mount_guess_content_type (GMount *mount,
g_ptr_array_add (types, g_strdup ("x-content/image-picturecd"));
}
if (_check_file (root, ".autorun", TRUE) ||
_check_file (root, "autorun", TRUE) ||
_check_file (root, "autorun.sh", TRUE) ||
_check_file_case_insensitive (root, "autorun.exe", TRUE) ||
_check_file_case_insensitive (root, "autorun.inf", FALSE)) {
if (g_file_is_native (root) &&
(_check_file (root, ".autorun", TRUE) ||
_check_file (root, "autorun", TRUE) ||
_check_file (root, "autorun.sh", TRUE) ||
_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 */
g_ptr_array_add (types, g_strdup ("x-content/software"));
}
no_sniff:
g_ptr_array_add (types, NULL);
......
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